QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#773441 | #9792. Ogre Sort | ucup-team3510# | WA | 1ms | 3572kb | C++20 | 420b | 2024-11-23 08:50:17 | 2024-11-23 08:50:18 |
Judging History
answer
#include<iostream>
using namespace std;
int T,n,p[300010];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
T=1;
while(T--)
{
cin>>n;
int maxx=0,ans=0;
for(int i=1,x;i<=n;i++)
{
cin>>x;
p[x]=i;
maxx=max(maxx,x);
if(maxx>x)
{
ans=max(ans,x);
}
}
cout<<ans<<" "<<ans<<endl;
for(int i=ans;i;i--)
{
cout<<p[i]<<" "<<1<<endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3572kb
input:
4 1 2 4 3
output:
3 3 4 1 2 1 1 1
result:
wrong answer participant used a nop move