# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80803 | 2018-10-22T11:18:44 Z | farukkastamonuda | Palindromes (info1cup18_palindromes) | C++14 | 479 ms | 66096 KB |
#include <bits/stdc++.h> #define fi first #define se second #define lo long long #define inf 1000000000 #define md 1000000007 #define li 2005 #define mp make_pair #define pb push_back using namespace std; int n, x, xx; lo int sum; int main(){ scanf("%d", &n); for(int i = 1;i <= n; i++){ scanf("%d", &x); xx = x; vector< int > v; while(x){ v.pb(x % 10); x /= 10; } int flag = 0; int bas = 0, son = (int)v.size() - 1; while(bas < son){ if(v[bas] != v[son]){ flag = 1; break; } bas++; son--; } if(flag == 0) sum += xx; } printf("%lld", sum); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 504 KB | Output is correct |
2 | Correct | 8 ms | 592 KB | Output is correct |
3 | Correct | 254 ms | 5600 KB | Output is correct |
4 | Correct | 352 ms | 12900 KB | Output is correct |
5 | Correct | 467 ms | 22528 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 22528 KB | Output is correct |
2 | Correct | 4 ms | 22588 KB | Output is correct |
3 | Correct | 109 ms | 24156 KB | Output is correct |
4 | Correct | 215 ms | 26884 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 22528 KB | Output is correct |
2 | Correct | 4 ms | 22588 KB | Output is correct |
3 | Correct | 109 ms | 24156 KB | Output is correct |
4 | Correct | 215 ms | 26884 KB | Output is correct |
5 | Correct | 2 ms | 26884 KB | Output is correct |
6 | Correct | 8 ms | 26968 KB | Output is correct |
7 | Correct | 224 ms | 30020 KB | Output is correct |
8 | Correct | 331 ms | 33856 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 504 KB | Output is correct |
2 | Correct | 8 ms | 592 KB | Output is correct |
3 | Correct | 254 ms | 5600 KB | Output is correct |
4 | Correct | 352 ms | 12900 KB | Output is correct |
5 | Correct | 467 ms | 22528 KB | Output is correct |
6 | Correct | 2 ms | 22528 KB | Output is correct |
7 | Correct | 4 ms | 22588 KB | Output is correct |
8 | Correct | 109 ms | 24156 KB | Output is correct |
9 | Correct | 215 ms | 26884 KB | Output is correct |
10 | Correct | 2 ms | 26884 KB | Output is correct |
11 | Correct | 8 ms | 26968 KB | Output is correct |
12 | Correct | 224 ms | 30020 KB | Output is correct |
13 | Correct | 331 ms | 33856 KB | Output is correct |
14 | Correct | 2 ms | 33860 KB | Output is correct |
15 | Correct | 17 ms | 34244 KB | Output is correct |
16 | Correct | 198 ms | 38116 KB | Output is correct |
17 | Correct | 429 ms | 46724 KB | Output is correct |
18 | Correct | 479 ms | 56428 KB | Output is correct |
19 | Runtime error | 459 ms | 66096 KB | Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience. |
20 | Halted | 0 ms | 0 KB | - |