QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#855943 | #9969. Kindergarten Square | ideograph_advantage# | RE | 0ms | 3688kb | C++14 | 561b | 2025-01-13 13:22:57 | 2025-01-13 13:22:58 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define iter(v) v.begin(), v.end()
#define SZ(v) int(v.size())
#define pb emplace_back
#define ff first
#define ss second
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
while(t--){
int a,b,c,d;
cin >> a >> b >> c >> d;
if(b-a!=1 || d-c!=1){
cout << "-1" << "\n";
continue;
}
int w=c-a;
if(a%w==0){
cout << -1 << "\n";
continue;
}
cout << 100000 << " " << w << "\n";
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3668kb
input:
4 6 7 10 11 2 3 4 5 8 5 5 13 1 2 5 6
output:
100000 4 -1 -1 100000 4
result:
ok All testcases passed.
Test #2:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
10 1 2 4 5 4 3 2 1 1 2 5 6 2 3 5 6 2 3 6 7 3 4 6 7 2 1 3 4 1 2 2 3 2 3 3 4 7 7 7 7
output:
100000 3 -1 100000 4 100000 3 100000 4 -1 -1 -1 -1 -1
result:
ok All testcases passed.
Test #3:
score: -100
Runtime Error
input:
10 1 1 1 1 1 2 3 4 1 2 5 7 4 5 7 8 1001 1002 1003 1004 1001 1002 1005 1007 1004 1005 1007 1008 249 250 251 252 250 251 250 251 250 250 250 251