QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#344362 | #6431. Oops, It's Yesterday Twice More | Lavine | WA | 53ms | 3596kb | C++20 | 645b | 2024-03-04 09:14:41 | 2024-03-04 09:14:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std ;
int main()
{
ios::sync_with_stdio(false) ;
cin.tie(0) ;
const int up = 1000000 ;
int T ;
cin >> T ;
while(T --)
{
int n ;
cin >> n ;
vector<int> a(n) ;
for(int i = 0 ; i < n ; i ++) cin >> a[i] ;
for(int x = 0 ; x <= up ; x += 1)
{
vector<int> b(n) ;
for(int i = 0 ; i < n ; i ++) b[i] = __builtin_popcountll(i + x) ;
if(b == a)
{
cout << x << '\n' ;
break ;
}
}
}
return 0 ;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 53ms
memory: 3596kb
input:
3 3 3
output:
result:
wrong answer Failed