for(int i=0; i<n; i++)
vector<int> v(n);
sort(arr, arr+n);
dp[i][j] = max(dp[i-1][j], dp[i][j-1]);
while(l < r)
if(graph[u][v] == 1)
ans = (ans * base) % mod;
queue<pair<int,int>> q;
return gcd(a, b);
cout << result << endl;
1
0
1
1
0
1
0
1
0
O(n²)
O(log n)
O(n log n)
O(1)
O(2ⁿ)
O(n³)

CF Problem Tracker

Track your competitive programming journey

Analytics
Rankings
Streaks