QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#276351#4385. RandomchunzhifengWA 12ms3624kbC++14401b2023-12-05 20:15:562023-12-05 20:15:56

Judging History

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

  • [2023-12-05 20:15:56]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:3624kb
  • [2023-12-05 20:15:56]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned ll
#define endl "\n"
#define PII pair<int,int>
const ll INF=0x3f3f3f3f3f3f3f3f;
const int mod=1e9+7;
const int N=2e6+5;
void solve(){
	int n,m; cin>>n>>m;
	cout<<(n-m)*(mod+1)/2%mod<<endl;
}
int main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	int T=1; cin>>T;
    while(T--) solve();
}

详细

Test #1:

score: 0
Wrong Answer
time: 12ms
memory: 3624kb

input:

100000
42 30
6335 1161
19170 15725
11479 6401
26963 24465
5706 5322
23282 16828
9962 492
2996 2955
4828 609
32392 14605
3903 154
293 77
17422 1295
19719 177
5448 5383
14772 11539
1870 1213
25668 632
17036 9895
28704 23812
31323 30334
17674 4665
15142 7712
28254 6869
25548 2097
32663 95
20038 12860
8...

output:

705032745
429708497
218128084
674348376
-835473144
-273526777
479586513
946077681
-974836316
671074540
-377198861
894273933
625818464
846449909
-50520232
-859738101
592309629
82488118
-829567689
382205581
-131339138
578764916
919565885
-146681320
-968481493
239375724
779111129
-592630737
414366312
9...

result:

wrong answer 1st lines differ - expected: '6', found: '705032745'