QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#379197#8566. Can We Still Qualify For Semifinals?ucup-team3215#WA 0ms3580kbC++20354b2024-04-06 16:33:182024-04-06 16:33:18

Judging History

你现在查看的是最新测评结果

  • [2024-04-06 16:33:18]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3580kb
  • [2024-04-06 16:33:18]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

void solve() {
    int n;
    string s;
    cin >> n >> s;
    int cnt = 0;
    for (int i = 0; 5 * i < n; ++i) {
        cnt += s[5 * i] == '0';
    }
    cout << (9 - cnt > 5 ? "YES" : "NO") << endl;
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3540kb

input:

3
3
111
25
1000010101111111111010100
35
01111011110111101111011110111101111

output:

YES
YES
NO

result:

ok 3 token(s): yes count is 2, no count is 1

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3580kb

input:

10
16
0110000001010100
17
01111000110110101
15
001100010101111
16
0010101010011100
19
0000000100010110100
16
0011101010011100
18
011110010001100000
18
000110101001100011
20
01100010000100100100
15
001000111001101

output:

NO
NO
YES
NO
NO
NO
NO
NO
NO
YES

result:

wrong answer expected YES, found NO [1st token]