結果
| 問題 |
No.1895 Mod 2
|
| コンテスト | |
| ユーザー |
ぷら
|
| 提出日時 | 2022-04-08 22:21:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 512 bytes |
| コンパイル時間 | 1,965 ms |
| コンパイル使用メモリ | 199,040 KB |
| 最終ジャッジ日時 | 2025-01-28 16:19:33 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 1 |
| other | MLE * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<long long>tmp;
for(long long i = 1; i*i <= 1000000000000000; i += 2) {
long long j = i*i;
while (j <= 1000000000000000) {
tmp.push_back(j);
j *= 2;
}
}
sort(tmp.begin(),tmp.end());
int t;
cin >> t;
while (t--) {
long long l,r;
cin >> l >> r;
cout << (upper_bound(tmp.begin(),tmp.end(),r)-lower_bound(tmp.begin(),tmp.end(),l))%2 << endl;
}
}
ぷら