sudmondal2002's blog

By sudmondal2002, history, 21 month(s) ago, In English

Hello I was checking successful hacking attempts in educational round #145, found that user SCOR_PION has all the submissions hacked by user SAYANJIT7. How is that possible? so I checked the submissions of SCOR_PION. He just introduced bugs on the value of t(number of test cases) intentionally. And among the 14000 users SAYANJIT7 even managed to find him. How co-incident is that?

check out some snippets

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    ll t; cin>>t;
    if(t==1999) cout<<-1<<endl;
    else{
    while(t--){
        solve();
    }
    }
    return 0;
}
int main(){
    int T; cin >> T;
    if(T==500) cout << "HACK IT" ;
    while(T--){
        ll n; cin >> n;
        ll lo = 1, hi = 1e10;
        while(lo <= hi){
            ll mid = lo + (hi-lo)/2;
            ll first_element = 1LL + (mid-1)*(mid-1);
            ll last_element = first_element + 2LL*mid - 2LL;
            if(n >= first_element && n <= last_element) {
                cout << mid-1 << endl;
                break;
            }else if(n > last_element) lo = mid+1;
            else hi = mid-1;
        }
    }
    return 0; 
}
  • Vote: I like it
  • +5
  • Vote: I do not like it

»
21 month(s) ago, # |
  Vote: I like it -8 Vote: I do not like it

Auto comment: topic has been updated by sudmondal2002 (previous revision, new revision, compare).

»
21 month(s) ago, # |
  Vote: I like it -8 Vote: I do not like it

Auto comment: topic has been updated by sudmondal2002 (previous revision, new revision, compare).

»
21 month(s) ago, # |
  Vote: I like it -8 Vote: I do not like it

Auto comment: topic has been updated by sudmondal2002 (previous revision, new revision, compare).

»
21 month(s) ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

.

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it +12 Vote: I do not like it

    It is his second account. LOL

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it -6 Vote: I do not like it

    I'm unsure that if this event is rated for hacking but definitely this can happen in other events as well