結果
問題 | No.1930 XOR of Two Range |
ユーザー | monnu |
提出日時 | 2022-05-06 23:17:21 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 611 bytes |
コンパイル時間 | 5,727 ms |
コンパイル使用メモリ | 225,480 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-20 05:54:39 |
合計ジャッジ時間 | 5,267 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,380 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll=long long; using Graph=vector<vector<int>>; #define INF 1000000000 #define MOD 998244353 #define MAX 300000 void solve(){ ll L,R; cin>>L>>R; int l=R-L+1; if(l%8==0){ cout<<0<<'\n'; }else if(l%8==1){ cout<<L+R<<'\n'; }else if(l%8==2){ cout<<1<<'\n'; }else if(l%8==3){ cout<<1<<'\n'; }else if(l%8==4){ cout<<1<<'\n'; }else if(l%8==5){ cout<<((L+R)^1)<<'\n'; }else{ cout<<0<<'\n'; } } int main(){ int T; cin>>T; for(int i=0;i<T;i++){ solve(); } }