QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#773441#9792. Ogre Sortucup-team3510#WA 1ms3572kbC++20420b2024-11-23 08:50:172024-11-23 08:50:18

Judging History

This is the latest submission verdict.

  • [2024-11-23 08:50:18]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3572kb
  • [2024-11-23 08:50:17]
  • Submitted

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

詳細信息

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