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 math | |
from sys import exit, argv, stdin, stdout, stderr | |
__LOCAL__ = True if (len(argv) > 1 and argv[1] == 'LOCAL') else False | |
inp = 0 | |
outp = 0 | |
if __LOCAL__: | |
inp = open('input.txt', "r") |
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
int main() | |
{ | |
ios_base::sync_with_stdio(0); | |
int n, m; | |
cin >> n >> m; | |
bool sost[101][101]; | |
sost[1][1] = true; | |
for(int i = 1; i <= n; i++) | |
for(int j = 1; j <= m; j++) |
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> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//#include <ext/pb_ds/tree_policy.hpp> | |
using namespace std; | |
//using namespace __gnu_pbds; | |
#define INF (1<<30) |
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
from sys import stdin, stdout, stderr, exit | |
import random | |
import time | |
random.seed() | |
A = 2 | |
B = -2 | |
C = 16 | |
M = 16 |
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
var n: int64; | |
h: array[0..1000002] of int64; | |
comp: array[0..3000008] of array[0..1] of int64; | |
d, max_dp_found, max_dp_found_ind, mx : int64; | |
compsz: int64; | |
tr: array[0..6000100] of array[0..1] of int64; | |
trSz, i, j, mxp: longint; | |
pos: array[0..6000100] of int64; | |
dp: array[0..6001000] of int64; | |
ans: array[0..1010100] of int64; |
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> | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
using namespace std; | |
using namespace __gnu_pbds; | |
#define INF (1<<30) |
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> | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
using namespace std; | |
using namespace __gnu_pbds; | |
#define INF (1<<30) |
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> | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
using namespace std; | |
using namespace __gnu_pbds; | |
#define INF (1<<30) |
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
pair<ll, ll> get(ll x, ll i) | |
{ | |
pair<ll, ll> res = {0, 0}; | |
x++; | |
ll max_bl_cnt = (x / (1ll << (i + 1))); | |
res.F = res.S = max_bl_cnt * (1ll << i); | |
ll left = x - max_bl_cnt * (1ll << (i + 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> | |
//#include <ext/pb_ds/assoc_container.hpp> | |
//#include <ext/pb_ds/tree_policy.hpp> | |
//#include <Rescue.h> | |
using namespace std; | |
//using namespace __gnu_pbds; | |