본문 바로가기

Programming/Judge14

ACMICPC 1205 : 등수 구하기 http://www.acmicpc.net/problem/1205 #include #include using namespace std; int main() { vector scores; int num_score, score, max_rank; cin >> num_score >> score >> max_rank; for (int i = 0; i > in_temp; scores.push_back(in_temp); } if (num_score == max_rank && scores[num_score - 1] >= score) cout 2014. 12. 13.
ACMICPC 1002 : 터렛 http://www.acmicpc.net/problem/1002 #include using namespace std; int main(){ int num_cases = 0; cin >> num_cases; for (int i = 0; i > x1 >> y1 >> r1 >> x2 >> y2 >> r2; d1 = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); d2 = (r1 + r2) * (r1 + r2); if (x1 == x2 && y1 == y2 && r1 == r2) { cout 2014. 12. 12.
ACMICPC 1000 : A+B http://www.acmicpc.net/problem/1000 #include using namespace std; int main(){ int a, b; cin >> a >> b; cout 2014. 12. 12.
Algospot : LECTURE https://algospot.com/judge/problem/read/LECTURE #include #include #include #include using namespace std; int main(void) { int num_cases = 0; cin >> num_cases; for (int i = 0; i > in_str; int half_size = in_str.length() / 2; for (int j = 0; j < half_size; ++j) { vec_string.push_back(in_str.substr(j * 2, 2)); } sort(vec_string... 2014. 12. 12.
Algospot : DRAWRECT https://algospot.com/judge/problem/read/DRAWRECT #include using namespace std; int GetDifferent(int a, int b, int c) { return (a == b) ? c : (b == c) ? a : b; } int main() { int num_cases = 0; cin >> num_cases; for (int i = 0; i > x[j] >> y[j]; } cout 2014. 12. 11.
Algospot : ENDIANS https://algospot.com/judge/problem/read/ENDIANS #include #include using namespace std; int main() { int num_edian = 0; vector v; cin >> num_edian; for (int i = 0; i > i_temp; v.push_back(i_temp); } for (auto i = v.begin(); i != v.end(); ++i) { unsigned char uc_temp; uc_temp = *((unsigned char*)&(*i) + 3); *((unsigned char*)&(*i) + 3) = *((unsigned ch.. 2014. 12. 11.