Thanks :D
What's your opinion about Competitive Programming 3
And what make Competitive programmer handbook in the best ?
because Qualification of IOI in April and I will try hard to finish one book with Practice
Why it's Wrong Answer
#include <iostream>using namespace std;int main(){long long n , h , x , ind = 1;bool t = false ;cin>>n>>h ;long long arr[100001];for(long long i = 1 ; i <= n ; ++i){cin>>x ;arr[i] = x ;}while(cin>>x){if(x == 0)break ;if(x == 1){ind-- ;
It's my solution The website told me Fatal
#include <bits/stdc++.h>using namespace std;typedef long long ll ;int main(){ll n , x , y , z = -1;cin>>n ;ll arr[n+1] , arr1[n+1] , arr2[n+1];for(ll i = 1 ; i <= n ; ++i){cin>>x>>y ;z = max(z , abs(x - y));if(x >= y)arr1[i] = 1 ;elsearr1[i] = 2 ;arr[i] = x ;arr2[i] = y ;}