QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#916894#9133. Function with Many MaximumsDalek_of_Rivia#WA 1ms3584kbC++23652b2025-02-27 00:28:512025-02-27 00:28:54

Judging History

This is the latest submission verdict.

  • [2025-02-27 00:28:54]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3584kb
  • [2025-02-27 00:28:51]
  • Submitted

answer

#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    int T=1;
    //cin>>T;
    
    for(int dalekofrivia=T; dalekofrivia>0; dalekofrivia--){
        int b;
        cin>>b;
        //b=100000;
        int n = 2*b-1;
        int a = n*1000000;
        for(int i=0; i<b; i++){
            cout<<a<<" ";
            if(i+1!=b){
                int c = a+1;
                while(((n+1-2*i)*a+c)%(n+1-2*i-3)!=0) c++;
                cout<<c<<" ";
                a=((n+1-2*i)*a+c)/(n+1-2*i-3);
            }
        }
    }

    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3584kb

input:

4

output:

7000000 7000005 12600001 12600003 29400003 29400004 147000016 

result:

wrong answer Integer parameter [name=n] equals to 7000000, violates the range [1, 500000]