You are viewing a single comment's thread. Return to all comments →
I'm very weak with time limit execution
#include<iostream> int main(){ int t; std::cin>>t; int arr[t][2]; for(int i = 0;i<t;i++){ scanf("%d %d", &arr[i][0], &arr[i][1]); } int count = 0; for(int i = 0;i<t-1;i++){ for(int j = i+1;j<t;j++){ if(arr[i][0] != arr[j][0] && arr[i][1] != arr[j][1]){ if(arr[j][1]/arr[i][0]+arr[j][1]%arr[i][0] == arr[i][1]/arr[j][0]+arr[i][1]%arr[j][0]){ count++; } } } } std::cout<<count<<std::endl; }
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Jokes
You are viewing a single comment's thread. Return to all comments →
I'm very weak with time limit execution