# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168911 | 2019-12-17T05:40:17 Z | abil | Gift (IZhO18_nicegift) | C++14 | 1642 ms | 22664 KB |
#include <bits/stdc++.h> #define fr first #define sc second #define pb push_back #define mk make_pair #define all(s) s.begin(),s.end() #define int long long using namespace std; const int N = (1e6 + 12); const int mod = (1e9 + 7); const int INF = (0x3f3f3f3f); int a[N]; main() { int n, k; bool f = true; scanf("%lld%lld", &n, &k); for(int i = 1;i <= n; i++){ scanf("%lld", &a[i]); if(i > 1){ if(a[i] != a[i - 1]){ f = false; } } } if(f){ if(n % k == 0){ cout << n / k << endl; int x = n / k, cnt = 1; while(x--){ cout << a[1] << " "; for(int i = 1;i <= k; i++){ cout << cnt << " "; cnt++; } cout << endl; } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 380 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 380 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 380 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1642 ms | 22664 KB | n=1000000 |
2 | Correct | 801 ms | 22652 KB | n=666666 |
3 | Correct | 331 ms | 12796 KB | n=400000 |
4 | Incorrect | 51 ms | 6392 KB | Unexpected end of file - int32 expected |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 380 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |