QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#858372#4755. Romualdych and remaindersrotcar07WA 313ms3584kbC++23288b2025-01-16 16:42:352025-01-16 16:42:58

Judging History

This is the latest submission verdict.

  • [2025-01-16 16:42:58]
  • Judged
  • Verdict: WA
  • Time: 313ms
  • Memory: 3584kb
  • [2025-01-16 16:42:35]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    int n;cin>>n;
    while(n--){
        ll a,b,r;cin>>a>>b>>r;
        if(r*2>b) cout<<"-1 -1\n";
        else if(a<=r&&r<=b) cout<<r<<" "<<r+1<<'\n';
        else cout<<b<<' '<<b-r<<'\n';
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:

2
6 8 0
3 5 10

output:

8 8
-1 -1

result:

ok good (2 test cases)

Test #2:

score: -100
Wrong Answer
time: 313ms
memory: 3456kb

input:

200000
611798478556051906 630182047660550624 712293791209079022
853240706540428329 922637400970484112 626594903783173477
197243701653451300 295095047071741142 449297196551949579
839353411868302800 886351194213373918 579004595736495353
939764026573336488 969028156240926594 445397937769727031
19628624...

output:

-1 -1
-1 -1
-1 -1
-1 -1
969028156240926594 523630218471199563
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
244547860816547665 244547860816547666
-1 -1
-1 -1
93899842918579548 93899842918579549
93024393655179394 93024393655179395
-1 -1
-1 -1
-1 -1
992516657145327111 6616766936253...

result:

wrong answer you dind't find a solution but jury did (test case 6)