Submission #499448

# Submission time Handle Problem Language Result Execution time Memory
499448 2021-12-28T12:39:54 Z Ibraheem Kutije (COCI21_kutije) C++14
0 / 70
1000 ms 204 KB
#include<bits/stdc++.h>
using namespace std;
int a[4];
int b[4];
int c[4];
int d[4];
int main(){
    int n , m , k , r , e , i = 1 , l , q , w , p;
    cin >> n >> l >> q;
    while(l > 0){
        cin >> m >> k >> r >> e;
        if(m == 1){
            a[i] = m;
        }
        if( m == 2){
            b[i] = m;
        }if( m == 3){
            c[i] = m;
        }if( m == 4){
            d[i] = m;
        }if( k == 1){
            a[i] = k;
        }if(k == 2){
            b[i] = k;
        }if( k == 3){
            c[i] = k;
        }if( m == 4){
            d[i] = k;
        }if( r == 1){
            a[i] = r;
        }if( r == 2){
            b[i] = r;
        }if( r == 3){
            c[i] = r;
        }if( r == 4){
            d[i] = r;
        }if( e == 1){
            a[i] = e;
        }if( e == 2){
            b[i] = e;
        }if( e == 3){
            c[i] = e;
        }if( e == 4){
            d[i] = e;
        }
        n--;
    }while(p > 0){
        cin >> w >> q;
        if(q == 1){
            if(a[w] == q){
                cout << "DA";
            }else{
                cout << "NE";
            }
        }if(q == 2){
            if(d[w] == q){
                cout << "DA";
            }else{
                cout << "NE";
            }
        }if(q == 3){
            if(c[w] == q){
                cout << "DA";
            }else{
                cout << "NE";
            }
        }if(q == 4){
            if(d[w] == q){
                cout << "DA";
            }else{
                cout << "NE";
            }
        }
        p--;
    }
    
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:74:10: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
   74 |         p--;
      |         ~^~
# Verdict Execution time Memory Grader output
1 Execution timed out 1089 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1078 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1078 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1089 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -