Submission #159705

# Submission time Handle Problem Language Result Execution time Memory
159705 2019-10-24T03:54:17 Z geon040702 그릇 (KOI13_bowl) C++14
16 / 16
2 ms 384 KB
#include <bits/stdc++.h>
using namespace std;

string dish;

int main(void)
{
    int i, ans;
    cin >> dish;
    
    ans = 10;
    for(i=1;i<dish.size();i++) {
        if(dish[i] == dish[i-1]) {
            ans += 5;
        }
        else {
            ans += 10;
        }
    }
    
    printf("%d\n", ans);
    return 0;
}

Compilation message

aa.cpp: In function 'int main()':
aa.cpp:12:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=1;i<dish.size();i++) {
             ~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 2 ms 252 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct