QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#554491 | #5602. Sun and Moon | nfls_vjudge | WA | 0ms | 3560kb | C++14 | 998b | 2024-09-09 11:31:09 | 2024-09-09 11:31:09 |
Judging History
answer
// Hydro submission #66de69b0a6791e5a5fba281d@1725852665652
#include <bits/stdc++.h>
#define fi first
#define se second
#define bit(x) (1LL << (x))
#define getbit(x, i) (((x) >> (i)) & 1)
#define ALL(x) (x.begin(), x.end())
using namespace std;
template <typename T1, typename T2> bool maxi(T1 &a, T2 b) {
if (a < b) {a = b; return true;} return false;
}
template <typename T1, typename T2> bool mini(T1 &a, T2 b) {
if (a > b) {a = b; return true;} return false;
}
const int N = 2e5 + 5;
const int oo = 1e9;
const long long ooo = 1e18;
int main() {
int a, b;
int c, d;
cin >> a >> b >> c >> d;
int curb = b-a;
int curd = d-c;
for(int i = 1; i <= 100; i++)
{
// cout << curb << " " << curd << "\n";
curb--;
curd--;
if(curb == 0 && curd == 0)
{
cout << i << '\n';
return 0;
}
if(curb == 0) curb = b;
if(curd == 0) curd = d;
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3560kb
input:
3 10 1 2
output:
7
result:
ok single line: '7'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3556kb
input:
27 32 39 41
output:
result:
wrong answer 1st lines differ - expected: '453', found: ''