Submission #887002

# Submission time Handle Problem Language Result Execution time Memory
887002 2023-12-13T12:20:12 Z Turcavid Football (info1cup20_football) C++14
0 / 100
2000 ms 428 KB
#include <bits/stdc++.h>

using namespace std;

int32_t main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n, k0;
        cin>>n>>k0;
        bool ok=false;
        for(int j=0; j<32; j++)
        {
            int k=(1<<j);
            if(k0&k == 0)
                continue;
            int xsum=0;
            for(int i=1; i<=n; i++)
            {
                int a;
                cin>>a;
                int c=a/k;
                int r=a%k;
                if(c%2 == 1)
                {
                    c=k;
                }
                else
                {
                    c=0;
                }
                xsum=(xsum^(c^r));
            }
            if(xsum != 0)
                ok=true;
        }
        cout<<ok;
    }
    return 0;
}

Compilation message

football.cpp: In function 'int32_t main()':
football.cpp:17:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   17 |             if(k0&k == 0)
      |                   ~~^~~~
# Verdict Execution time Memory Grader output
1 Execution timed out 2035 ms 344 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 418 ms 428 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2060 ms 348 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2045 ms 348 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2023 ms 424 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2037 ms 408 KB Time limit exceeded
2 Halted 0 ms 0 KB -