QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#855943#9969. Kindergarten Squareideograph_advantage#RE 0ms3688kbC++14561b2025-01-13 13:22:572025-01-13 13:22:58

Judging History

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

  • [2025-01-13 13:22:58]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:3688kb
  • [2025-01-13 13:22:57]
  • 提交

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

output:


result: