Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

tzl_Dedicatus545's blog

By tzl_Dedicatus545, history, 7 weeks ago, In English

in the 191667514 problem 1778B - The Forbidden Permutation, the problem promises that p is a permutation, but in fact, when I output p's value in pretest 2 case 120 by using following code:

vector<int> p(n+10);
vector<int> a(m+10);
if(cnt==120)
	cout<<"Case120:"<<n<<" "<<m<<endl;
rep(i,1,n,1){
        cin>>p[i];
	if(cnt==120)
		cout<<p[i]<<" ";
}

the output is:

Case120:2 1
3 3 
1 
4557430888798830399

the p is not a permutation, what happens?

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by tzl_Dedicatus545 (previous revision, new revision, compare).

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

https://codeforces.com/contest/1778/submission/191671485

this code is copypasting editorial solution but asserting p is a permutation, it passes

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

https://codeforces.com/contest/1778/submission/191675106

I got different output in pretest 2 case 120, and it's valid.