QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#409626#6727. K-hour ClockxiaoleWA 20ms3688kbC++23562b2024-05-12 13:33:342024-05-12 13:33:35

Judging History

你现在查看的是最新测评结果

  • [2024-05-12 13:33:35]
  • 评测
  • 测评结果:WA
  • 用时:20ms
  • 内存:3688kb
  • [2024-05-12 13:33:34]
  • 提交

answer

#include<bits/stdc++.h>
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
using namespace std;using ll = long long;using PLL = pair<ll,ll>;
const ll MAX = 1e18;const ll MIN = -1e18;const ll INF=0x3f3f3f3f;
const ll Q = 2e5+9;const ll MOD = 1e9 + 7;
ll x,y,z;
void solve(){
   cin>>x>>y>>z;
    x+=y;
    x-=z;
    if(x==0){
        cout<<z+1<<"\n";
        return;
    }
    if(x<0){
        cout<<-1<<"\n";
        return;
    }
   cout<<x<<"\n";
   
}
int main(){
    ios;ll _=1;cin>>_;
    while (_--)solve();
    return 0;
}

詳細信息

Test #1:

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

input:

4
11 18 5
3 49 4
1 9 1
1 3 10

output:

24
48
9
-1

result:

ok 4 cases

Test #2:

score: -100
Wrong Answer
time: 20ms
memory: 3684kb

input:

100000
186826504 580942638 34507146
409013320 825277663 642758065
221040339 32805624 253845963
759538401 529610463 314034771
591738614 223935926 591499221
272890462 257036262 529926724
644722795 540369561 79342760
141738127 915104743 658190166
378771709 735410115 474472687
550207480 676282297 233056...

output:

733261996
591532918
253845964
975114093
224175319
529926725
1105749596
398652704
639709137
1203184138
317612555
1057591501
673441983
847965981
-1
4320427
643543523
1229562136
797923156
233325064
488183711
524483170
913981025
347546858
611749282
-1
1345234741
862956524
1053306920
248241206
-1
4100331...

result:

wrong answer Case #2: k <= z (x = 409013320, y = 825277663, z = 642758065, k = 591532918)