QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#88125#2301. Jet SetBitrollWA 0ms3612kbC++111.0kb2023-03-15 11:25:262023-03-15 11:25:30

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-15 11:25:30]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3612kb
  • [2023-03-15 11:25:26]
  • 提交

answer

#include<bits/stdc++.h>
#include <iomanip>
using namespace std;

// debug util
#ifdef DEBUG
    #define deb(x) cerr << #x << " = " << x << endl
#else
    #define deb(x)
#endif

// useful
#define ll long long
#define umap unordered_map
bool multi = false;

void solve(){
	int n;
	cin >> n;

	bool vis[720+1000] = {};

	int from, to, bk;
	cin >> from >> from;

	for (int i = 0; i < n; i++){
		cin >> to >> to;

		// get fastest route
		if ((-to +from) > (360 -from -to)){
			bk = from;
			from = to;
			to = bk;
		}

		deb(from);
		deb(to);

		int j = from;
		while(true){

			vis[1000 + j*2] = true;
			if (j != to)
				vis[1000 + j*2 +1] = true;
			else
				break;

			j++;
			if (j >= 180) j -= 360;
		}
	}

	for (int i = 1000-180*2; i < 1000+180*2; i++){
		if (!vis[i]){
			cout << "no " << fixed << setprecision(1) << (double)(i-1000)/2 << endl;
			return;
		}
	}
	cout << "yes" << endl;

	
}

int main(){
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    if(multi)cin>>t;
    while(t--)solve();
    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3612kb

input:

6
0 -180
0 60
0 -60
0 -179
0 -60
0 60

output:

no 60.5

result:

wrong answer Wrong answer: the route passes through the given meridian.