답안 #1026593

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1026593 2024-07-18T08:23:49 Z 변재우(#10949) COVID tests (CEOI24_covid) C++17
10 / 100
41 ms 344 KB
#include <bits/stdc++.h>
using namespace std;

signed main() {
    int N, T; double P;
    scanf("%d%lf%d", &N, &P, &T);
    while(T--) {
        bool chk[1010]={0};
        for(int i=1; i<=N; i++) {
            printf("Q ");
            for(int j=1; j<=N; j++) {
                if(j==i) printf("1");
                else printf("0");
            }
            printf("\n");
            fflush(stdout);
            char x; scanf(" %c", &x);
            if(x=='P') chk[i]=true;
        }
        printf("A ");
        for(int i=1; i<=N; i++) printf("%d", chk[i]);
        printf("\n");
        fflush(stdout);
        char x; scanf("%c", &x);
    }
    return 0;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |     scanf("%d%lf%d", &N, &P, &T);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:17:26: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |             char x; scanf(" %c", &x);
      |                     ~~~~~^~~~~~~~~~~
Main.cpp:24:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   24 |         char x; scanf("%c", &x);
      |                 ~~~~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB translate:wrong
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 344 KB Output is correct
2 Correct 30 ms 344 KB Output is correct
3 Correct 29 ms 344 KB Output is correct
4 Correct 35 ms 340 KB Output is correct
5 Correct 32 ms 344 KB Output is correct
6 Correct 22 ms 344 KB Output is correct
7 Correct 22 ms 344 KB Output is correct
8 Correct 22 ms 344 KB Output is correct
9 Correct 22 ms 344 KB Output is correct
10 Correct 30 ms 344 KB Output is correct
11 Correct 21 ms 344 KB Output is correct
12 Correct 30 ms 344 KB Output is correct
13 Correct 27 ms 344 KB Output is correct
14 Correct 23 ms 344 KB Output is correct
15 Correct 22 ms 344 KB Output is correct
16 Correct 23 ms 344 KB Output is correct
17 Correct 22 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 41 ms 344 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -