# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
668108 | Manoush | Dijamant (COCI22_dijamant) | C++14 | 2 ms | 852 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ll long long int
#define F first
#define S second
#define pb push_back
using namespace std;
vector<set<ll>>v(2003);
ll n,m;
ll fun1 (ll x,ll y)
{
//cout<<"hello "<<x<<" "<<y<<endl;
if (x==INT_MAX)return 0;
ll q=*v[y].lower_bound(x+1);
if (q==INT_MAX||q==INT_MIN)return 0;
ll sum=q-x-1;
//cout<<" sum "<<sum<<" "<<q<<endl;
if (sum%2==0)return 0;
if (y<sum/2+1||(m-y)<sum/2+1)return 0;
ll u=(q-x)/2;
//cout<<"u "<<u<<endl;
ll con=1;
for (ll i=1;i<u;i++)
{
// cout<<"1 "<<y+i<<" "<<x+i<<endl;
ll x1=*v[y+i].lower_bound(x+i);
//cout<<"2 "<<y-i<<" "<<x+i<<endl;
ll x2=*v[y-i].lower_bound(x+i);
//cout<<"3 "<<y+i<<" "<<x1+1<<endl;
ll y1=*v[y+i].lower_bound(x1+1);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |