# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
696319 | 2023-02-06T08:16:01 Z | stevancv | Collecting Stamps 3 (JOI20_ho_t3) | C++14 | 0 ms | 212 KB |
// GPT TESTING #include <bits/stdc++.h> using namespace std; const int N=210; int n,l,cnt,ans,x[N],t[N]; bool cmp(int a,int b){ return t[a]<t[b]; } int main(){ scanf("%d%d",&n,&l); for(int i=0;i<n;i++){ scanf("%d",&x[i]); x[i+n]=x[i]+l; } for(int i=0;i<n;i++){ scanf("%d",&t[i]); } for(int i=0;i<n;i++){ cnt=0; vector<int>v; for(int j=0;j<n*2;j++){ int tmp=(j+i)%n; if(x[j]<=x[i]+t[i]){ cnt++; v.push_back(tmp); } } ans=max(ans,cnt); for(int j=0;j<cnt-1;j++){ if(x[v[j+1]+n]-x[v[j]]>t[v[j]]){ ans=max(ans,j+1); break; } } } printf("%d\n",ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |