Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

02Ljh's blog

By 02Ljh, history, 9 months ago, In English

228371945

1168C - И-достижимость

This is the code which is $$$O(n^2)$$$ that passed this problem. The std is $$$O(nlogn)$$$.

this is the hack.

#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("and.in","w",stdout);
    cout<<"300000 300000\n";
    cout<<1<<' ';
    for(int i=2;i<=300000-2;i++)
    {
        cout<<0<<' ';
    }
    cout<<3<<' '<<2<<'\n';
    for(int i=1;i<=300000;i++)
    {
        cout<<1<<' '<<300000<<'\n';
    }
    return 0;
}

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it