# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
715080 |
2023-03-25T22:11:12 Z |
Emma |
Izbori (COCI22_izbori) |
C++11 |
|
3000 ms |
340 KB |
#include<bits/stdc++.h>
using namespace std;
int main (){
int n;
int antun = 0;
int counter=0;
//int counterr=n-1;
int turn = 0;
int branka = 0;
int k;
cin>>n>>k;
k = k*2-1;
string pebbles;
cin>>pebbles;
while (antun<k&&branka<k){
if(pebbles[counter]==80){
turn++;
counter++;
}
else if(pebbles[n-counter-1]==80){
turn++;
counter++;
}
else {
if(turn%2==1){
branka++;
}
else{
antun++;
}
turn++;
}
}
if(antun>branka){
cout<<"NE";
}
else{
cout<<"DA";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3080 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3080 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3080 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |