This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long LL; | |
const int MAX = 10000001; | |
const int MOD = 1e9 + 7; | |
#define inchar getchar_unlocked | |
#define outchar(x) putchar_unlocked(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long LL; | |
const int MAX = 5e5 + 5; | |
const int MAX2 = 1e6 + 6; | |
const int MOD = 1e9 + 7; | |
int phi[MAX]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************** | |
* AUTHOR: BHUVNESH JAIN * | |
* INSTITUITION: BITS PILANI, PILANI * | |
******************************************/ | |
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long LL; | |
int mul(int a, int b, int c) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from queue import * | |
def gcd(a,b): | |
while b: | |
a,b=b,a%b | |
return a | |
def expo(a,b): | |
x,y=1,a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int t, n; | |
cin >> t; | |
assert(1 <= t && t <= 10); | |
while(t--) { | |
cin >> n; | |
assert(1 <= n && n <= 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
const int MAX = 1e5 + 5; | |
const int MOD = 1e9 + 7; | |
long long ans[MAX]; | |
int main() { | |
ios_base::sync_with_stdio(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int t, n; | |
string s; | |
cin >> t; | |
while(t--) { | |
cin >> n; | |
map<string, int> mp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
const int MAX = 1e5 + 5; | |
const int MOD = 1e9 + 7; | |
long long a[MAX]; | |
int main() { | |
a[0] = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
ios_base::sync_with_stdio(false); | |
int t, n; | |
cin >> t; | |
assert(1 <= t && t <= 10); | |
while(t--) { | |
cin >> n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
ios_base::sync_with_stdio(false); | |
int t, n; | |
cin >> t; | |
assert(1 <= t && t <= 100); | |
while(t--) { | |
cin >> n; |
OlderNewer