02Ljh's blog

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

228371945

1168C - And Reachability

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;
}
  • Vote: I like it
  • +2
  • Vote: I do not like it

»
13 months ago, # |
  Vote: I like it -9 Vote: I do not like it

orz