본문 바로가기

분류 전체보기351

[15000] CAPS #include #include using namespace std;int main(){int i;string s1;cin >> s1;for (i = 0; i 2018. 8. 26.
[2386] 도비의 영어 공부 #include #include using namespace std;int main(){while (1){int sum = 0, i;string s1, s2;cin >> s1;getline(cin, s2);if (s1 == "#")break;for (i = 0; i = 65 && s2[i] 2018. 8. 26.
[4613] Quicksum #include #include using namespace std;int main(){while (1){int sum = 0, i;string s;getline(cin, s);if (s == "#")break;for (i = 0; i 2018. 8. 26.
[2743] 단어 길이 재기 #include #include using namespace std;int main(){string s;cin >> s;cout 2018. 8. 25.
[15894] 수학은 체육과목입니다 #include using namespace std;int main(){unsigned int n;cin >> n;cout 2018. 8. 25.
[11370] Spawn of Ungoliant #include using namespace std;int main(){int i, j, k, w, h;while (1){scanf("%d %d", &w, &h);if (w == 0 || h == 0)break;char** arr = new char*[h + 2];for (i = 0; i 2018. 8. 25.
[11367] Report Card Time #include #include using namespace std;void result(int score);int main(){int testcase;cin >> testcase;while (testcase--){string name;int score;cin >> name >> score;if (score >= 0 && score 2018. 8. 24.
[11366] Tons of Orcs, no Fibbin’ #include using namespace std;int main(){int a, b, c;while (1){scanf("%d %d %d", &a, &b, &c);if (c 2018. 8. 24.
[11365] !밀비 급일 #include #include #include using namespace std;int main(){while (1){string s;getline(cin, s);if (s == "END")break;reverse(s.begin(), s.end());cout 2018. 8. 24.
[2635] 수 이어가기 #include #include #include using namespace std;int main(){int n, i, sub;vector arr;srand((int)time(NULL));cin >> n;arr.push_back(n);arr.push_back(rand() % n + 1);sub = n - (rand() % n + 1);while (sub >= 0){arr.push_back(sub);sub = arr[arr.size() - 2] - arr[arr.size() - 1];}cout 2018. 8. 24.
[4796] 캠핑 #include using namespace std;int main(){int count = 1;while (1){int l, p, v;cin >> l >> p >> v;if (!l && !p && !v)break;int sum = (v%p) > l ? l : (v%p);int result = v/p*l + sum;cout 2018. 8. 24.
[11895] 속이기 #include #include using namespace std;int xy = 0, sum = 0;int arr[1010];int main(){int n, i;cin >> n;for (i = 0; i > arr[i];xy ^= arr[i];sum += arr[i];}sort(arr, arr + n);if (xy)cout 2018. 8. 23.
[2456] 나는 학급회장이다 #include using namespace std;int main(){int n, i, j;pair arr[3];cin >> n;for (i = 0; i a;arr[j].first += a;arr[j].second += a*a;}}int max = 0, check = 0;if (arr[0] 2018. 8. 23.
[1269] 대칭 차집합 #include #include using namespace std;int main(){set s;int n1, n2, i;cin >> n1 >> n2;for (i = 0; i > a;s.insert(a);}for (i = 0; i > a;if (s.count(a)) s.erase(a);else s.insert(a);}cout 2018. 8. 21.
[9971] The Hardest Problem Ever #include #include using namespace std;char chip[26] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };char plain[26] ={ 'V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U' };int main(){string str;while (1){cin >> str;cin.ignore();char s[101];if (str == "START"){while (1){cin.get(s, 101.. 2018. 8. 19.
[9455] 박스 #include using namespace std;int main(){int testcase, m, n, sum, cnt, i ,j;int arr[101][101] = { 0 };cin >> testcase;while (testcase--){cin >> m >> n;sum = 0;for (i = 1; i arr[i][j];for (j = 1; j = 1; i--){cnt = 0;if (arr[i][j] == 1){for (int k = i + 1; k 2018. 8. 19.
[13240] chessboard #include using namespace std;int main(){int i, j;int n, m;char star[11][11] = {};cin >> n >> m;for (i = 1; i 2018. 8. 19.
[2506] 점수계산 #include using namespace std;int main(){int Testcase, i, Allcount, Count;int n;cin >> Testcase;Allcount = 0;Count = 0;for (i = 0; i > n;if (n == 1){Count++;Allcount += Count;}elseCount = 0;}cout 2018. 8. 19.
[12778] CTP공국으로 이민 가자 #include using namespace std;int main(){int testcase, m, j;char alp;int arr1[501];char arr2[501];cin >> testcase;for (j = 0; j > m >> alp;if (alp == 'C'){for (int i = 0; i > arr2[i];}for (int i = 0; i arr1[i];}for (int i = 0; i 2018. 8. 18.
[5339] 콜센터 #include int main(){printf(" /~\\\n");printf(" ( oo|\n");printf(" _\\=/_\n");printf(" / _ \\\n");printf(" //|/.\\|\\\\ \n");printf(" || \\ / ||\n");printf("============\n");printf("| |\n");printf("| |\n");printf("| |\n");return 0;} 2018. 8. 18.