QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#88127 | #2301. Jet Set | Bitroll | WA | 2ms | 3364kb | C++11 | 1.0kb | 2023-03-15 11:26:47 | 2023-03-15 11:26:49 |
Judging History
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;
}
from = to;
}
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: 2ms
memory: 3364kb
input:
6 0 -180 0 60 0 -60 0 -179 0 -60 0 60
output:
yes
result:
wrong answer Wrong answer: expected 'no', got 'yes'.