QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#916897 | #9133. Function with Many Maximums | Dalek_of_Rivia# | WA | 10ms | 3584kb | C++23 | 673b | 2025-02-27 00:36:53 | 2025-02-27 00:36:53 |
Judging History
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;
cout<<n<<endl;
int a = n*3000000;
for(int i=0; i<b; i++){
cout<<a<<" ";
if(i+1!=b){
int c = a+1;
c+=n+1-2*i-3-((n+1-2*i)*a+c)%(n+1-2*i-3);
cout<<c<<" ";
a=((n+1-2*i)*a+c)/(n+1-2*i-3);
}
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 10ms
memory: 3584kb
input:
4
output:
199999 599997000000 599997199637 600009000121 600009197232 600021000602 600021192307 600033001443 600033184862 600045002644 600045174897 600057004205 600057162412 600069006126 600069147407 600081008407 600081129882 600093011048 600093109837 600105014049 600105087272 600117017410 600117062187 6001290...
result:
wrong answer Integer element a[45083] equals to 1000012234897, violates the range [1, 10^12]