Submission #141644

# Submission time Handle Problem Language Result Execution time Memory
141644 2019-08-08T15:31:38 Z MihneaHedea COCI17_cezar (COCI17_cezar) C++14
50 / 50
2 ms 448 KB
#include <iostream>

using namespace std;

int pct[12],n,i,x,y,s1,s2,sum;

int main () {

    for (i=2;i<=11;i++)
        pct[i] = 4;
    pct[10] *= 4;
    cin>>n;
    for (i=1;i<=n;i++) {
        cin>>x;
        sum+=x;
        pct[x]--;
    }
    y=21-sum;
    for (i=2;i<=y;i++)
        s1+=pct[i];
    for (i=y+1;i<=11;i++)
        s2+=pct[i];
    if (s2>=s1)
        cout<<"DOSTA\n";
    else
        cout<<"VUCI\n";

}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 448 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 368 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 400 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 368 KB Output is correct
3 Correct 2 ms 360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 292 KB Output is correct
2 Correct 2 ms 360 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 404 KB Output is correct
2 Correct 2 ms 292 KB Output is correct
3 Correct 2 ms 296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 372 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 348 KB Output is correct