| 1 |
int x = 0; |
| 2 |
long long x = 0; |
| 3 |
int n, m; |
| 4 |
cin >> n >> m; |
| 5 |
cout << ans << 'n'; |
| 6 |
x++; |
| 7 |
x--; |
| 8 |
++x; |
| 9 |
--x; |
| 10 |
x += y; |
| 11 |
x -= y; |
| 12 |
x *= y; |
| 13 |
x /= y; |
| 14 |
x %= y; |
| 15 |
x = a + b; |
| 16 |
x = a - b; |
| 17 |
x = a * b; |
| 18 |
x = a / b; |
| 19 |
x = a % b; |
| 20 |
long long x = 1LL * a * b; |
| 21 |
if (a < b) { |
| 22 |
if (a <= b) { |
| 23 |
if (a > b) { |
| 24 |
if (a >= b) { |
| 25 |
if (a == b) { |
| 26 |
if (a != b) { |
| 27 |
if (a && b) { |
| 28 |
if (a || b) { |
| 29 |
if (!used[v]) { |
| 30 |
if (x % 2 == 0) { |
| 31 |
if (x % 2 != 0) { |
| 32 |
if (condition) { |
| 33 |
if (x == 0) { |
| 34 |
if (x < 0) { |
| 35 |
if (x >= mod) { |
| 36 |
else { |
| 37 |
else if (x < y) { |
| 38 |
for (int i = 0; i < n; ++i) { |
| 39 |
for (int i = 1; i <= n; ++i) { |
| 40 |
for (int i = n - 1; i >= 0; --i) { |
| 41 |
for (int i = 0; i + 1 < n; ++i) { |
| 42 |
for (int i = 0; i < (int)a.size(); ++i) { |
| 43 |
for (int j = 0; j < m; ++j) { |
| 44 |
for (int j = i + 1; j < n; ++j) { |
| 45 |
for (int j = 0; j < i; ++j) { |
| 46 |
for (int to : g[v]) { |
| 47 |
for (auto x : a) { |
| 48 |
for (auto [to, w] : g[v]) { |
| 49 |
while (l < r) { |
| 50 |
while (l <= r) { |
| 51 |
while (x > 0) { |
| 52 |
break; |
| 53 |
continue; |
| 54 |
return 0; |
| 55 |
return ans; |
| 56 |
vector<int> a(n); |
| 57 |
vector<long long> a(n); |
| 58 |
vector<int> a(n, 0); |
| 59 |
vector<int> dp(n + 1); |
| 60 |
vector<long long> dp(n + 1); |
| 61 |
vector<vector<int>> g(n); |
| 62 |
vector<vector<int>> dp(n + 1, vector<int>(m + 1)); |
| 63 |
vector<pair<int, int>> edges; |
| 64 |
a.push_back(x); |
| 65 |
a.pop_back(); |
| 66 |
a.clear(); |
| 67 |
a.resize(n); |
| 68 |
a.assign(n, 0); |
| 69 |
int n = a.size(); |
| 70 |
int n = (int)a.size(); |
| 71 |
a.empty(); |
| 72 |
a.front(); |
| 73 |
a.back(); |
| 74 |
string s; |
| 75 |
cin >> s; |
| 76 |
int n = s.size(); |
| 77 |
char c = s[i]; |
| 78 |
s += c; |
| 79 |
s.push_back(c); |
| 80 |
s.pop_back(); |
| 81 |
s.substr(l, len); |
| 82 |
s.find(t); |
| 83 |
pair<int, int> p; |
| 84 |
make_pair(a, b); |
| 85 |
p.first; |
| 86 |
p.second; |
| 87 |
auto [x, y] = p; |
| 88 |
swap(a, b); |
| 89 |
min(a, b); |
| 90 |
max(a, b); |
| 91 |
ans = min(ans, x); |
| 92 |
ans = max(ans, x); |
| 93 |
sort(a.begin(), a.end()); |
| 94 |
sort(a.rbegin(), a.rend()); |
| 95 |
reverse(a.begin(), a.end()); |
| 96 |
lower_bound(a.begin(), a.end(), x); |
| 97 |
upper_bound(a.begin(), a.end(), x); |
| 98 |
int pos = lower_bound(a.begin(), a.end(), x) - a.begin(); |
| 99 |
int pos = upper_bound(a.begin(), a.end(), x) - a.begin(); |
| 100 |
min_element(a.begin(), a.end()); |
| 101 |
max_element(a.begin(), a.end()); |
| 102 |
int mn = *min_element(a.begin(), a.end()); |
| 103 |
int mx = *max_element(a.begin(), a.end()); |
| 104 |
set<int> s; |
| 105 |
multiset<int> s; |
| 106 |
map<int, int> mp; |
| 107 |
unordered_map<int, int> mp; |
| 108 |
s.insert(x); |
| 109 |
s.erase(x); |
| 110 |
s.find(x); |
| 111 |
s.count(x); |
| 112 |
mp[x]++; |
| 113 |
mp[x] = y; |
| 114 |
mp.count(x); |
| 115 |
deque<int> dq; |
| 116 |
dq.push_back(x); |
| 117 |
dq.push_front(x); |
| 118 |
dq.pop_back(); |
| 119 |
dq.pop_front(); |
| 120 |
dq.front(); |
| 121 |
dq.back(); |
| 122 |
const int INF = 1e9; |
| 123 |
const long long INF = 4e18; |
| 124 |
const int MOD = 1e9 + 7; |
| 125 |
long long ans = 0; |
| 126 |
int ans = 0; |
| 127 |
int l = 0, r = n - 1; |
| 128 |
int mid = (l + r) / 2; |
| 129 |
int mid = l + (r - l) / 2; |
| 130 |
while (l <= r) { |
| 131 |
if (check(mid)) { |
| 132 |
else { |
| 133 |
while (l < r) { |
| 134 |
int mid = (l + r) / 2; |
| 135 |
if (check(mid)) { |
| 136 |
else { |
| 137 |
vector<long long> pref(n + 1); |
| 138 |
pref[i + 1] = pref[i] + a[i]; |
| 139 |
long long sum = pref[r] - pref[l]; |
| 140 |
int l = 0; |
| 141 |
for (int r = 0; r < n; ++r) { |
| 142 |
while (condition) { |
| 143 |
++l; |
| 144 |
int g = gcd(a, b); |
| 145 |
int lcm_value = lcm(a, b); |
| 146 |
x = gcd(x, a[i]); |
| 147 |
bool bit = x & (1 << k); |
| 148 |
x |= 1 << k; |
| 149 |
x ^= 1 << k; |
| 150 |
x &= ~(1 << k); |
| 151 |
for (int mask = 0; mask < (1 << n); ++mask) { |
| 152 |
if (mask & (1 << i)) { |
| 153 |
vector<vector<int>> g(n); |
| 154 |
g[v].push_back(to); |
| 155 |
g[to].push_back(v); |
| 156 |
vector<vector<pair<int, int>>> g(n); |
| 157 |
g[v].push_back({to, w}); |
| 158 |
g[to].push_back({v, w}); |
| 159 |
vector<int> used(n); |
| 160 |
vector<int> dist(n, -1); |
| 161 |
vector<int> parent(n, -1); |
| 162 |
void dfs(int v) { |
| 163 |
used[v] = true; |
| 164 |
for (int to : g[v]) { |
| 165 |
if (!used[to]) { |
| 166 |
dfs(to); |
| 167 |
int components = 0; |
| 168 |
for (int v = 0; v < n; ++v) { |
| 169 |
if (!used[v]) { |
| 170 |
++components; |
| 171 |
dfs(v); |
| 172 |
vector<int> color(n, -1); |
| 173 |
if (color[to] == -1) { |
| 174 |
color[to] = color[v] ^ 1; |
| 175 |
vector<int> dp(n + 1); |
| 176 |
dp[0] = 1; |
| 177 |
dp[i] = dp[i - 1] + 1; |
| 178 |
dp[i] = min(dp[i], dp[j] + 1); |
| 179 |
dp[i] = max(dp[i], dp[j] + 1); |
| 180 |
dp[i] += dp[i - 1]; |
| 181 |
dp[i] %= MOD; |
| 182 |
vector<vector<int>> dp(n + 1, vector<int>(m + 1)); |
| 183 |
dp[i][j] = dp[i - 1][j]; |
| 184 |
dp[i][j] = max(dp[i][j], dp[i - 1][j - 1] + 1); |
| 185 |
dp[i][j] = min(dp[i][j], dp[i - 1][j] + cost); |
| 186 |
fill(dp.begin(), dp.end(), INF); |
| 187 |
dp[0] = 0; |
| 188 |
for (int i = 1; i <= n; ++i) { |
| 189 |
for (int j = 0; j < i; ++j) { |
| 190 |
if (condition) { |
| 191 |
dp[i] = min(dp[i], dp[j] + cost); |
| 192 |
vector<int> parent(n + 1, -1); |
| 193 |
parent[i] = j; |
| 194 |
while (v != -1) { |
| 195 |
path.push_back(v); |
| 196 |
v = parent[v]; |
| 197 |
reverse(path.begin(), path.end()); |
| 198 |
function<void(int)> dfs = [&](int v) { |
| 199 |
function<long long(int)> solve = [&](int v) { |
| 200 |
auto cmp = [&](int x, int y) { |
| 201 |
sort(a.begin(), a.end(), cmp); |
| 202 |
int dx[] = {-1, 0, 1, 0}; |
| 203 |
int dy[] = {0, 1, 0, -1}; |
| 204 |
for (int dir = 0; dir < 4; ++dir) { |
| 205 |
int nx = x + dx[dir]; |
| 206 |
int ny = y + dy[dir]; |
| 207 |
if (nx < 0 || nx >= n || ny < 0 || ny >= m) { |
| 208 |
ios::sync_with_stdio(false); |
| 209 |
cin.tie(nullptr); |
Комментарии