QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#101537 | #6374. LaLa and Magic Circle (LiLi Version) | Remocuz | WA | 51ms | 10156kb | C++14 | 1.2kb | 2023-04-30 08:45:11 | 2023-04-30 08:45:15 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
//mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define mod 998244353
#define ll long long
#define inf 0x3f3f3f3f
#define INF 0x3f3f3f3f3f3f3f3f
inline int read()
{
char ch=getchar(); int nega=1; while(!isdigit(ch)) {if(ch=='-') nega=-1; ch=getchar();}
int ans=0; while(isdigit(ch)) {ans=ans*10+ch-48;ch=getchar();}
if(nega==-1) return -ans;
return ans;
}
void print(vector<int> x){for(int i=0;i<(int)x.size();i++) printf("%d%c",x[i]," \n"[i==(int)x.size()-1]);}
signed main()
{
int n=998;
vector<pair<int,int>> v;
cout<<n+2<<endl;
for(int i=1;i<=n;i++)
{
if(i%2==0) v.eb(i,1);
else v.eb(i,2);
}
printf("%d %d\n",1,0);
printf("%d %d\n",n,0);
for(int i=(int)v.size()-1;i>=0;i--) printf("%d %d\n",v[i].first,v[i].second);
vector<vector<int>> ans;
for(int i=1;i<=n;i++)
{
for(int j=1;j+1<(int)v.size();j++)
{
if(v[j].second<v[j+1].second&&v[j].second<v[j-1].second)
{
ans.pb({v[j+1].first,v[j+1].second,v[j-1].first,v[j-1].second});
v[j].second+=2;
}
}
}
cout<<ans.size()<<endl;
for(auto i:ans) print(i);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 51ms
memory: 10156kb
input:
output:
1000 1 0 998 0 998 1 997 2 996 1 995 2 994 1 993 2 992 1 991 2 990 1 989 2 988 1 987 2 986 1 985 2 984 1 983 2 982 1 981 2 980 1 979 2 978 1 977 2 976 1 975 2 974 1 973 2 972 1 971 2 970 1 969 2 968 1 967 2 966 1 965 2 964 1 963 2 962 1 961 2 960 1 959 2 958 1 957 2 956 1 955 2 954 1 953 2 952 1 951...
result:
wrong answer Both p and q must be on the boundary of the convex hull