QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#344362#6431. Oops, It's Yesterday Twice MoreLavineWA 53ms3596kbC++20645b2024-03-04 09:14:412024-03-04 09:14:42

Judging History

你现在查看的是最新测评结果

  • [2024-03-04 09:14:42]
  • 评测
  • 测评结果:WA
  • 用时:53ms
  • 内存:3596kb
  • [2024-03-04 09:14:41]
  • 提交

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 ;
}

详细

Test #1:

score: 0
Wrong Answer
time: 53ms
memory: 3596kb

input:

3 3 3

output:


result:

wrong answer Failed