Submission #1101339

# Submission time Handle Problem Language Result Execution time Memory
1101339 2024-10-16T06:13:12 Z AlperenT_ COVID tests (CEOI24_covid) C++17
10 / 100
3333 ms 592 KB
#include <bits/stdc++.h> 
#define pb push_back
#define F first
#define pii pair<int,int> 
#define all(a) a.begin(),a.end()
#define S second 
#define sz(a) (int)a.size()
#define rep(i , a , b) for(int i = (a) ; i <= (b) ; i++)
#define per(i , a , b) for(int i = (a) ; i >= (b) ; i--)
#define int long long 
#define ld long double 
using namespace std ;
const int maxn = 5e5 + 200 , maxq = 2e6+10 , mod = 1e9 + 7 , mod2 = 1e9 + 7, inf = 1e9 ;  


signed main(){
    ios_base::sync_with_stdio(false) ; cin.tie(0) ; 
    int T , n ;
    ld p ;
    cin >> n >> p >> T ;
    while(T--){
        string ans ; 
        rep(i , 1, n){
            string s ;
            rep(j ,1 ,n){
                if(j==i)s += '1';
                else s += '0' ;
            }
            cout << "Q " << s << endl ;
            char a ;
            cin >> a; 
            if(a=='P'){
                ans+='1';
            }else{
                ans+='0';
            }
        }
        cout << "A " << ans << endl  ;
        char x ;
        cin >> x ;
        if(x=='W')exit(0); 
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 592 KB Output is correct
2 Correct 10 ms 468 KB Output is correct
3 Correct 10 ms 472 KB Output is correct
4 Correct 10 ms 468 KB Output is correct
5 Correct 9 ms 336 KB Output is correct
6 Correct 9 ms 336 KB Output is correct
7 Correct 9 ms 336 KB Output is correct
8 Correct 10 ms 592 KB Output is correct
9 Correct 9 ms 472 KB Output is correct
10 Correct 11 ms 336 KB Output is correct
11 Correct 10 ms 468 KB Output is correct
12 Correct 9 ms 336 KB Output is correct
13 Correct 9 ms 468 KB Output is correct
14 Correct 9 ms 336 KB Output is correct
15 Correct 11 ms 456 KB Output is correct
16 Correct 9 ms 336 KB Output is correct
17 Correct 9 ms 592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 3333 ms 336 KB Incorrect
2 Halted 0 ms 0 KB -