NULLgorithm's blog

By NULLgorithm, history, 4 months ago, In English

Problem : CF Round 955 F

  • 267435166 in C++ 20 fails custom invocation for test case 1 whereas same code passes custom invocation for C++ 17 and 14
  • 267434819 in C++ 17 passes custom invocation for test case 1 whereas verdict shows WA on test case 1
  • On uncommenting the line cout<<s.size()<<"\n"; in 267435166, the custom invocation outputs for l and r match the correct answer.

test case:

2
5
2 2 3 4 5
3
2 1
4 1
1 1
5
1 2 3 4 5
9
1 4
2 3
5 2
3 1
1 1
5 1
4 1
3 1
2 1

Custom invocation output for C++ 17:

-1 -1
1 2
1 4
3 4
-1 -1
1 3
1 3
1 5
1 5
2 5
2 5
2 5
2 5
-1 -1

=====
Used: 30 ms, 0 KB

Submission grader output:

-1 -1
1 2
1 4
3 4
-1 -1
1 3
1 3
1 5
1 5
2 5
2 5
2 5
2 5
5 5

The code passes test case 1 on my machine as well. Can anyone please help me out??

  • Vote: I like it
  • -7
  • Vote: I do not like it

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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