# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83496 | 2018-11-08T13:27:21 Z | nikolapesic2802 | Take-out (POI13_usu) | C++14 | 501 ms | 60344 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back int main() { int n,k; scanf("%i %i",&n,&k); char s[n]; scanf("%s",s); int i=0,j=n-1; while(i<=j) { set<int> index; int c=1,b=k; for(int l=0;l<k+1;l++) { index.insert(i); if(s[i]=='c') c--; else b--; i++; } i--; while(c!=0||b!=0) { index.insert(j); if(s[j]=='c') c--; else b--; if(s[i]=='c') c++; else b++; index.erase(i); i--; j--; } i++; for(auto p:index) { printf("%i ",p+1); } printf("\n"); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 488 KB | Linia 2: Podany ruch nie zawiera dokladnie k bialych i jednego czarnego klocka. |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 488 KB | Output is correct |
2 | Incorrect | 2 ms | 488 KB | Linia 2: Podany ruch nie zawiera dokladnie k bialych i jednego czarnego klocka. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 488 KB | Linia 11: Podany ruch nie zawiera dokladnie k bialych i jednego czarnego klocka. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 628 KB | Output is correct |
2 | Runtime error | 64 ms | 11696 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 33 ms | 11696 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 32 ms | 11696 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 33 ms | 11696 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 35 ms | 11696 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 266 ms | 12728 KB | Output is correct |
2 | Correct | 501 ms | 60344 KB | Output is correct |
3 | Runtime error | 46 ms | 60344 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
4 | Halted | 0 ms | 0 KB | - |