buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
/*
मनस्वी म्रियते कामं कार्पण्यं न तु गच्छति ।
अपि निर्वाणमायाति नानलो याति शीतताम् ॥
*/
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define mod 1000000007
#define pb push_back
#define ll long long int... | /*
मनस्वी म्रियते कामं कार्पण्यं न तु गच्छति ।
अपि निर्वाणमायाति नानलो याति शीतताम् ॥
*/
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define mod 1000000007
#define pb push_back
#define ll long long int... | [["+", 0, 11, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 9, 0, 1, 0, 11, 12, 23, 0, 25], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 378 |
// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;
template <typename T> bool chmin(T &x, T y) {
if (x > y) {
x = y;
return true;
}
return false;
}
templat... | // Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;
template <typename T> bool chmin(T &x, T y) {
if (x > y) {
x = y;
return true;
}
return false;
}
templat... | [["-", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 72], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 1 | 306 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n + 1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(), (x).end()
#define rwhole(x) (x).rbegin(), (x... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n + 1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(), (x).end()
#define rwhole(x) (x).rbegin(), (x... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 273 |
import sys
input = sys.stdin.readline
N, K = map(int, input().split())
A = list(map(int, input().split()))
l = 1
r = 2*10**9
while r - l > 1:
m = (l+r)//2
count = 0
for a in A:
count += (a+m-1)//m-1
if count <= K:
r = m
else:
l = m
print(r) | import sys
input = sys.stdin.readline
N, K = map(int, input().split())
A = list(map(int, input().split()))
l = 0
r = 2*10**9
while r - l > 1:
m = (l+r)//2
count = 0
for a in A:
count += (a+m-1)//m-1
if count <= K:
r = m
else:
l = m
print(r) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 106 |
'''
自宅用PCでの解答
'''
import math
#import numpy as np
import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7... | '''
自宅用PCでの解答
'''
import math
#import numpy as np
import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7... | [["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 166 |
#define CPP17
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstddef>
#include <deque>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>... | #define CPP17
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstddef>
#include <deque>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>... | [["+", 0, 52, 8, 9, 0, 338, 8, 57, 0, 121], ["+", 8, 9, 0, 338, 8, 57, 15, 339, 0, 24], ["+", 0, 338, 8, 57, 15, 339, 51, 16, 31, 22], ["+", 0, 338, 8, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 338, 8, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 338, 8, 57, 15, 339, 0, 25]] | 1 | 815 |
import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')
N, K = map(int, input().split())
A = list(map(int, input().split()))
lo = 0
hi = max(A) + 1
def ceildiv(a, b):
return (a + b - 1) // b
while lo < hi:
tar = (lo + hi) // 2
cuts = 0
for v in A:
x = ceildiv(v, tar)
cuts += x - 1
if cuts > K:
... | import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')
N, K = map(int, input().split())
A = list(map(int, input().split()))
lo = 1
hi = max(A) + 1
def ceildiv(a, b):
return (a + b - 1) // b
while lo < hi:
tar = (lo + hi) // 2
cuts = 0
for v in A:
x = ceildiv(v, tar)
cuts += x - 1
if cuts > K:
... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 138 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define em emplace_back
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, k;
cin >> n >> k;
vector<ll> a(n);
for (ll &x : a)
cin >> x;
ll l = 1, r = (ll)1e9 + 1;
while (r - l > 1) {
ll mid = (l + r) / 2;
bool bl = 1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define em emplace_back
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, k;
cin >> n >> k;
vector<ll> a(n);
for (ll &x : a)
cin >> x;
ll l = 0, r = (ll)2e9 + 1;
while (r - l > 1) {
ll mid = (l + r) / 2;
bool bl = 1... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 43, 49, 50, 51, 16, 31, 74, 51, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 51, 13]] | 1 | 195 |
#pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i >= b; --i)
#define pii pair<int, int>
#define pll pair<ll, ll>
#defi... | #pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i >= b; --i)
#define pii pair<int, int>
#define pll pair<ll, ll>
#defi... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 2,748 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
bool check(int n, int k, vector<int> a, int m) {
int cuts_need = 0;
for (int i : a) {
cuts_need += (i - 1) / m;
}
return cuts_need <= k;
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<in... | #include <bits/stdc++.h>
using namespace std;
#define int long long
bool check(int n, int k, vector<int> a, int m) {
int cuts_need = 0;
for (int i : a) {
cuts_need += (i - 1) / m;
}
return cuts_need <= k;
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<in... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<ll, ll>
#define left 2 * node + 1
#define right left + 1
#define mid (s + e >> 1)
const ll N = 5e5 + 5;
vector<ll> T[4 * N];
void build(ll A[], ll node, ll s, ll e) {
if (s == e) {
T[node].push_back(A[s]);
return;
}
bu... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<ll, ll>
#define left 2 * node + 1
#define right left + 1
#define mid (s + e >> 1)
const ll N = 5e5 + 5;
vector<ll> T[4 * N];
void build(ll A[], ll node, ll s, ll e) {
if (s == e) {
T[node].push_back(A[s]);
return;
}
bu... | [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 44]] | 1 | 489 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
int l = 1, r = 1e+9 + 1;
while (l + 1 < r) {
int m = (l + r) / 2;
ll cnt = 0;
for (int i = n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
int l = 0, r = 1e+9;
while (l + 1 < r) {
int m = (l + r) / 2;
ll cnt = 0;
for (int i = n - 1... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 186 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
double n, k, a[10000005];
bool OK(int req) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += ((a[i] - 1) / req);
}
if (sum <= k) {
return true;
} else {
return false;
}
}
signed main() {
cin >> n >> k;
for (int i = 1; i <... | #include <bits/stdc++.h>
#define int long long
using namespace std;
double n, k, a[10000005];
bool OK(int req) {
int sum = 0;
for (int i = 1; i <= n; i++) {
sum += ((a[i] - 1) / req);
}
if (sum <= k) {
return true;
} else {
return false;
}
}
signed main() {
cin >> n >> k;
for (int i = 1; i <... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 9, 0, 1, 0, 11... | 1 | 186 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#ifndef M_PI
#define M_PI 3.141592653589
#endif
#define int long long
#define double long double
#ifdef TIME
#define start ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#ifndef M_PI
#define M_PI 3.141592653589
#endif
#define int long long
#define double long double
#ifdef TIME
#define start ... | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 21], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 508 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_range(i, s, e) for (int i = (s); i < (int)(e); i++)
#define rep_rev(i, s, e) for (int i = (s)-1; i >= (int)(e); i--)
#define sort_vec(v) sort((v).begin(), (v).end())
typedef int64_t lint;
// lint mod = 9982443... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_range(i, s, e) for (int i = (s); i < (int)(e); i++)
#define rep_rev(i, s, e) for (int i = (s)-1; i >= (int)(e); i--)
#define sort_vec(v) sort((v).begin(), (v).end())
typedef int64_t lint;
// lint mod = 9982443... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 275 |
#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 ll long long
#define FI first
#define SE second
#define pb push_back
#define eb emplace_back
#define mod 1000000007
#define all(c) (c).begin(), (c).end()
#defi... | #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 ll long long
#define FI first
#define SE second
#define pb push_back
#define eb emplace_back
#define mod 1000000007
#define all(c) (c).begin(), (c).end()
#defi... | [["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 478 |
from math import ceil, floor
n,k = map(int,input().split())
a = list(map(int,input().split()))
l = 0
r = 10**9
m = (l+r)//2+1
for i in range(100):
# print(l,m,r)
cnt = 0
for j in a:
cnt += (j//m)
# print(cnt)
# print(l,m,r,cnt)
if cnt <= k:
r = m
m = ceil((l+r)/2)
els... | from math import ceil, floor
n,k = map(int,input().split())
a = list(map(int,input().split()))
l = 0
r = 10**9
m = (l+r)//2+1
for i in range(100):
# print(l,m,r)
cnt = 0
for j in a:
cnt += (ceil(j/m)-1)
# print(cnt)
# print(l,m,r,cnt)
if cnt <= k:
r = m
m = ceil((l+r)/2)
... | [["+", 0, 677, 12, 23, 0, 657, 31, 652, 63, 22], ["+", 12, 23, 0, 657, 31, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 677, 12, 23, 0, 657, 17, 676], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 17, 85], ["+", 12, 23, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 677, 12, 23, 0, 657, 17, 33], ["+", 0, 1, 0, 677, 12, 23, 0, 657, 12, 612]... | 5 | 125 |
//#include <fsociety>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unordered_map>
#include <unordered_set... | //#include <fsociety>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unordered_map>
#include <unordered_set... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 253 |
// abc174_e
#include <bits/stdc++.h>
#ifdef LOCAL
#include "../cxx-prettyprint/prettyprint.hpp"
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define REPN(i, m, n) for (int(i) = m; (i) < (int)(n); +... | // abc174_e
#include <bits/stdc++.h>
#ifdef LOCAL
#include "../cxx-prettyprint/prettyprint.hpp"
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define REPN(i, m, n) for (int(i) = m; (i) < (int)(n); +... | [["+", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 449 |
from math import ceil
n,k = map(int,input().split())
A = list(map(int,input().split()))
def flag(upper):
c = 0
for a in A:
c += int(a / upper)
if c > k:
return False
return True
def main():
A.sort(reverse=True)
low = 0
high = A[0]
while low < high:
mid ... | from math import ceil
n,k = map(int,input().split())
A = list(map(int,input().split()))
def flag(upper):
c = 0
for a in A:
c += ceil(a / upper) - 1
if c > k:
return False
return True
def main():
A.sort(reverse=True)
low = 1
high = A[0]
while low < high:
... | [["-", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 657, 31, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 33], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 12, 612], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 135 |
#include <bits/stdc++.h>
using namespace std;
#define sint(a) scanf("%d", &a)
#define sint2(a, b) scanf("%d %d", &a, &b)
#define sll(a) scanf("%lld", &a)
#define sll2(a, b) scanf("%lld %lld", &a, &b)
#define mem(a, i) memset(a, i, sizeof(a))
#define pb push_back
#define int long long
#define ll long long
#define lson ... | #include <bits/stdc++.h>
using namespace std;
#define sint(a) scanf("%d", &a)
#define sint2(a, b) scanf("%d %d", &a, &b)
#define sll(a) scanf("%lld", &a)
#define sll2(a, b) scanf("%lld %lld", &a, &b)
#define mem(a, i) memset(a, i, sizeof(a))
#define pb push_back
#define int long long
#define ll long long
#define lson ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 382 |
#include <bits/stdc++.h>
using namespace std;
#define PI acos(-1)
#define INF 0x3f3f3f
#define ll long long
#define pb push_back
#define mp make_pair
#define pair pair<int, int>
#define C(a) cout << a << endl;
#define CY cout << "YES" << endl;
#define CN cout << "NO" << endl;
#define Cy cout << "Yes" << endl;
#define C... | #include <bits/stdc++.h>
using namespace std;
#define PI acos(-1)
#define INF 0x3f3f3f
#define ll long long
#define pb push_back
#define mp make_pair
#define pair pair<int, int>
#define C(a) cout << a << endl;
#define CY cout << "YES" << endl;
#define CN cout << "NO" << endl;
#define Cy cout << "Yes" << endl;
#define C... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 299 |
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
left = -1
right = 10**9 + 1
while right - left > 1:
mid = (right + left) // 2
cnt = 0
for b in a:
cnt += b // mid + int(b % mid != 0) - 1
if cnt <= k:
... | import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
left = 0
right = 10**9 + 1
while right - left > 1:
mid = (right + left) // 2
cnt = 0
for b in a:
cnt += b // mid + int(b % mid != 0) - 1
if cnt <= k:
r... | [["-", 0, 656, 0, 1, 0, 662, 12, 664, 17, 33], ["-", 0, 656, 0, 1, 0, 662, 12, 664, 28, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 123 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define drep(i, n) for (int i = (n - 1); i >= 0; i--)
#define all(v) (v).begin(), (v).end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define drep(i, n) for (int i = (n - 1); i >= 0; i--)
#define all(v) (v).begin(), (v).end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {... | [["-", 0, 52, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 52, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 377 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
using namespace std;
int a[200005] = {0};
int n, k;
int solve(int fun) {
int num = 0;
for (int i = 0; i < n; i++) {
num += (a[i] - 1) / fun;
}
if (num <= k)
return 1;
return 0;
}
int main() {
cin >> n >> k;
for (in... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
using namespace std;
int a[200005] = {0};
int n, k;
int solve(int fun) {
int num = 0;
for (int i = 0; i < n; i++) {
num += (a[i] - 1) / fun;
}
if (num <= k)
return 1;
return 0;
}
int main() {
cin >> n >> k;
for (in... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 181 |
#include <bits/stdc++.h>
#define ll long long
#define ls id << 1
#define rs id << 1 | 1
#define mem(array, value, size, type) \
memset(array, value, ((size) + 5) * sizeof(type))
#define memarray(array, value) memset(array, value, sizeof(array))
#define pb(x) push_back(x)
#defi... | #include <bits/stdc++.h>
#define ll long long
#define ls id << 1
#define rs id << 1 | 1
#define mem(array, value, size, type) \
memset(array, value, ((size) + 5) * sizeof(type))
#define memarray(array, value) memset(array, value, sizeof(array))
#define pb(x) push_back(x)
#defi... | [["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 423 |
/**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author aryssoncf
*/
// Taken from:
// https://github.com/bqi343/USACO/blob/master/Implementations/content/contest/templateShort.cpp
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>... | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author aryssoncf
*/
// Taken from:
// https://github.com/bqi343/USACO/blob/master/Implementations/content/contest/templateShort.cpp
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 864 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lld = long double;
ll solve() {
ll N, K;
cin >> N >> K;
vector<ll> A(N);
for (int i = 0; i < N; i++)
cin >> A[i];
lld EPS = (lld)1e-10;
auto within_k = [&](lld x) {
ll n = 0;
for (int i = 0; i < N; i++) {
n += (ll)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lld = long double;
ll solve() {
ll N, K;
cin >> N >> K;
vector<ll> A(N);
for (int i = 0; i < N; i++)
cin >> A[i];
lld EPS = (lld)1e-10;
auto within_k = [&](lld x) {
ll n = 0;
for (int i = 0; i < N; i++) {
n += (ll)... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]] | 1 | 224 |
#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
int n, k;
vector<int> a;
int min_cut(int len) {
int cnt = 0;
for (int i = 0; i < n; i++) {
cnt += a[i] / len; // add min number of cuts
}
return cnt;
}
int main() {
ios::sync_with... | #include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
int n, k;
vector<int> a;
int min_cut(int len) {
int cnt = 0;
for (int i = 0; i < n; i++) {
cnt += (a[i] - 1) / len; // add min number of cuts
}
return cnt;
}
int main() {
ios::syn... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]] | 1 | 224 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> void print(T t) { cout << t << endl; }
template <typename T, typename... Args> void print(T t, Args... args) {
cout << t << " ";
print(args...);
}
typedef complex<double> base;
#define IOS ... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void print(T t) { cout << t << endl; }
template <typename T, typename... Args> void print(T t, Args... args) {
cout << t << " ";
print(args...);
}
typedef complex<double> base;
#define IOS ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 264 |
#include <bits/stdc++.h>
#define ll long long
#define db double
using namespace std;
const int M = 2e5 + 10;
int a[M], n, k;
bool check(int x) {
int cnt = 0;
for (int i = 0; i < n; i++)
cnt += (a[i] - 1) / x;
// printf("%d %d\n",x,cnt);
return cnt <= k;
}
int main() {
scanf("%d%d", &n, &k);
for (int i =... | #include <bits/stdc++.h>
#define ll long long
#define db double
using namespace std;
const int M = 2e5 + 10;
int a[M], n, k;
bool check(int x) {
int cnt = 0;
for (int i = 0; i < n; i++)
cnt += (a[i] - 1) / x;
// printf("%d %d\n",x,cnt);
return cnt <= k;
}
int main() {
scanf("%d%d", &n, &k);
for (int i =... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 202 |
#include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define ENDL '\n'
#define all(a) begin(a), end(a)
#define sz(a) (int)(a.size())
#define deb(a) cout << #a << ": " << a << ENDL;
#define fore(i, a, b) for (int i(a), ThkMk(b); i < ThkMk; ++i)
#define _ ... | #include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define ENDL '\n'
#define all(a) begin(a), end(a)
#define sz(a) (int)(a.size())
#define deb(a) cout << #a << ": " << a << ENDL;
#define fore(i, a, b) for (int i(a), ThkMk(b); i < ThkMk; ++i)
#define _ ... | [["-", 0, 11, 12, 23, 0, 41, 64, 16, 12, 13], ["+", 0, 11, 12, 23, 0, 41, 64, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 241 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
#define int ll
const ll MOD = 1000000007;
const ll INF_LL = (ll)1000000007 * 1000000007;
const int INF_INT = (int)1000000007;
const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
#define int ll
const ll MOD = 1000000007;
const ll INF_LL = (ll)1000000007 * 1000000007;
const int INF_INT = (int)1000000007;
const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 499 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
#define REP(i, n) for (int i = 0; i < n; ++i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
#define REP(i, n) for (int i = 0; i < n; ++i... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 395 |
// Author: Pakhomovee
#include <algorithm>
#include <chrono>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
using namespace std::chrono;
#... | // Author: Pakhomovee
#include <algorithm>
#include <chrono>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
using namespace std::chrono;
#... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]] | 1 | 285 |
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
//----------------------- Print Function ----------------------//
inline void print() { cout << endl; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
cout << first << ' ';
print(rest...);
}
... | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
//----------------------- Print Function ----------------------//
inline void print() { cout << endl; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
cout << first << ' ';
print(rest...);
}
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 315 |
#include <bits/stdc++.h>
#include <string>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(), (a).end()
typedef long long ll;
const ll MOD = 1000000007ll;
const int MAX = 5100000;
usi... | #include <bits/stdc++.h>
#include <string>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(), (a).end()
typedef long long ll;
const ll MOD = 1000000007ll;
const int MAX = 5100000;
usi... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 614 |
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 2e5 + 10;
#define fi first
#define se second
#define pb push_back
#define wzh(x) cerr << #x << '=' << x << endl;
int n, k;
double a[N];
int main() {
ios::sync_with_stdio(false);
cin >> n... | #pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 2e5 + 10;
#define fi first
#define se second
#define pb push_back
#define wzh(x) cerr << #x << '=' << x << endl;
int n, k;
int a[N];
int main() {
ios::sync_with_stdio(false);
cin >> n >>... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78]] | 1 | 207 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define endl "\n"
#define loop(i, s, e) for (int i = s; i < e; i++)
#define int long long
#define vi vector<int>
#define S(v) sort(v... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define endl "\n"
#define loop(i, s, e) for (int i = s; i < e; i++)
#define int long long
#define vi vector<int>
#define S(v) sort(v... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 372 |
#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 ll long long
#define uint unsigned int
#define ull unsigned long long
#define pb push_back
#define mk make_pair
#define ins insert
#define all(x) (x).begin(),... | #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 ll long long
#define uint unsigned int
#define ull unsigned long long
#define pb push_back
#define mk make_pair
#define ins insert
#define all(x) (x).begin(),... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 353 |
n, k = map(int, input().split())
A = list(map(int, input().split()))
def check(x):
cnt = 0
for a in A:
if a % x == 0:
cnt += a//x-1
else:
cnt += a//x
return k < cnt
L = 1
R = 10**10
while L != R-1:
M = (L+R)//2
if check(M):
L = M
else:
... | n, k = map(int, input().split())
A = list(map(int, input().split()))
def check(x):
cnt = 0
for a in A:
if a % x == 0:
cnt += a//x-1
else:
cnt += a//x
return k < cnt
L = 0
R = 10**10
while L != R-1:
M = (L+R)//2
if check(M):
L = M
else:
... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 114 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int n;
long double k;
long double a[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
// freopen("in.in", "r", stdin);
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
long double l = 0.1, r = 1e9;
long dou... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int n;
long double k;
long double a[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
// freopen("in.in", "r", stdin);
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
long double l = 0.1, r = 1e9;
long dou... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22]] | 1 | 225 |
//----AUTHOR:kkdrummer----/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unordered_set<ll> usll;
typedef uno... | //----AUTHOR:kkdrummer----/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unordered_set<ll> usll;
typedef uno... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 930 |
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;
#define IO \
std::ios::sync_with_stdio(false); \
cin.tie(0)
#define int long long
#define SZ(x) ((int)(x).size(... | #pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;
#define IO \
std::ios::sync_with_stdio(false); \
cin.tie(0)
#define int long long
#define SZ(x) ((int)(x).size(... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 379 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
#define LINF 1e18
typedef long long ll;
int main() {
int N, K;
ci... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
#define LINF 1e18
typedef long long ll;
int main() {
int N, K;
ci... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 192 |
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 667 |
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
#define INF 1000000021
#define MOD 1000000007
#define pb push_back
#define sqr(a) (a) * (a)
#define M(a, b) make_pair(a, b)
#define T(a, b, c) make_pair(a, make_pair(b, c))
#define F first
#define S second
#define all(x) (x.begin(), x.end())
#define d... | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
#define INF 1000000021
#define MOD 1000000007
#define pb push_back
#define sqr(a) (a) * (a)
#define M(a, b) make_pair(a, b)
#define T(a, b, c) make_pair(a, make_pair(b, c))
#define F first
#define S second
#define all(x) (x.begin(), x.end())
#define d... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 457 |
#include <bits/stdc++.h>
// using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++)
#define REP(i, j, n) for (ll i = (ll)(j); i... | #include <bits/stdc++.h>
// using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++)
#define REP(i, j, n) for (ll i = (ll)(j); i... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 1,909 |
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define f first
#define s second
#define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ \
ios_base::sync_with_stdio(0); ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 797 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n, k;
cin >> n >> k;
vector<ll> a(n);
for (ll i = 0; i < n; ++i)
cin >> a[i];
ll Min = 1;
ll Max = 1e10;
while (Max - Min > 1) {
ll Mid = (Min + Max) / 2;
ll sum = 0;
for (ll i = 0; i < n; ++i) {
sum... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n, k;
cin >> n >> k;
vector<ll> a(n);
for (ll i = 0; i < n; ++i)
cin >> a[i];
ll Min = 0;
ll Max = 1e10;
while (Max - Min > 1) {
ll Mid = (Min + Max) / 2;
ll sum = 0;
for (ll i = 0; i < n; ++i) {
sum... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 145 |
#include <bits/stdc++.h>
#define ll long long int
#define uu first
#define vv second
#define pii pair<int, int>
#define pdp pair<double, pii>
#define pll pair<ll, ll>
#define fastio \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define ll long long int
#define uu first
#define vv second
#define pii pair<int, int>
#define pdp pair<double, pii>
#define pll pair<ll, ll>
#define fastio \
ios_base::sync_with_stdio(0); ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 197 |
import sys
from collections import deque
import bisect
import copy
import heapq
import itertools
import math
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7
def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(... | import sys
from collections import deque
import bisect
import copy
import heapq
import itertools
import math
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7
def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(... | [["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 207 |
N, K = map(int, input().split())
A = list(map(int, input().split()))
def func(L):
res = 0
for x in A:
result += (x-1)//L
return res
l = 0
r = max(A)
while r-l > 1:
M = (r+l)//2
if case(M) >= K:
l = M
else:
r = M
print(r) | N,K=map(int,input().split())
A=list(map(int,input().split()))
def f(L):
res=0
for x in A:
res+=(x-1)//L
return res
l=0
r=max(A)
while r-l>1:
M=(r+l)//2
if f(M)>K:
l=M
else:
r=M
print(r)
| [["-", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]... | 5 | 103 |
# -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache
#############
# Const... | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache
#############
# Const... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 1,427 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int ksiz, ans, c[N], s[N], anss[N];
struct node {
int l, r, id;
} a[N];
void read(int &x) {
int f = 1;
x = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' &&... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int ksiz, ans, c[N], s[N], anss[N];
struct node {
int l, r, id;
} a[N];
void read(int &x) {
int f = 1;
x = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' &&... | [["-", 0, 7, 8, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 73]] | 1 | 500 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<bool> vb;
#define endl '\n'
#define all(x) x.begin(), x.end()
#define sz(x) (ll) x.size()
#define MOD 1000000007
#define F first
#def... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<bool> vb;
// #define endl '\n'
#define all(x) x.begin(), x.end()
#define sz(x) (ll) x.size()
#define MOD 1000000007
#define F first
#... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 36, 36, 36, 36, 0, 30, 0, 112, 0, 148], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 1,162 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pb push_back
#define pii pair<int, int>
#define fi first
#define se second
#define re cin >>
#define pr cout <<
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pb push_back
#define pii pair<int, int>
#define fi first
#define se second
#define re cin >>
#define pr cout <<
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 11, 12, 16, 31, 2, 3, 4, 0, 22], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 31, 22], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 435 |
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 22]] | 1 | 505 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tuple>
#include <unordered_map>
#incl... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tuple>
#include <unordered_map>
#incl... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 14, 8, 9, 0, 338, 49, 352, 0, 67]] | 1 | 848 |
I=lambda:map(int,input().split())
N=0xfffff
n,q=I()
c=list(I())
Q=[]
R=range
for i in R(q):l,r=I();Q.append(l<<40|r<<20|i)
Q.sort()
A=[[]for i in R(N)]
for i in R(n):A[c[i]].append(i)
B=[0]*N
def P(i,x):
i+=1
while i<=n:B[i]+=x;i+=i&-i
for i in A:
if i:P(i[0],1);i.reverse()
t=0
o=[0]*q
for x in Q:
l=x>>40-1
r=x>>2... | I=lambda:map(int,input().split())
N=0xfffff
n,q=I()
c=list(I())
Q=[]
R=range
for i in R(q):l,r=I();Q.append(l<<40|r<<20|i)
Q.sort()
A=[[]for i in R(N)]
for i in R(n):A[c[i]].append(i)
B=[0]*N
def P(i,x):
i+=1
while i<=n:B[i]+=x;i+=i&-i
for i in A:
if i:P(i[0],1);i.reverse()
t=0
o=[0]*q
for x in Q:
l=(x>>40)-1
r=x>... | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["-", 8, 196, 0, 52, 15, 666, 0, 657, 17, 72], ["-", 8, 196, 0, 52, 15, 666, 0, 657, 12, 612]] | 5 | 297 |
#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 1;
int n, p, q, c[N], g[N], h[N], l[N], r[N], ans[N];
bool compare(int i, int j) {
int u = l[i] / p, v = l[j] / p;
return u != v ? (u > v) : (r[i] / p > r[j] / p);
}
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr), cin >> n >> q;
fo... | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 1;
int n, p, q, c[N], g[N], h[N], l[N], r[N], ans[N];
bool compare(int i, int j) {
int u = l[i] / p, v = l[j] / p;
return u != v ? (u > v) : (r[i] / p > r[j] / p);
}
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr), cin >> n >> q;
fo... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 445 |
#include <bits/stdc++.h>
using namespace std;
typedef long double ld; // XD
#define int long long
#define PB push_back
#define all(x) (x).begin(), (x).end()
#define ii pair<int, int>
#define mii map<int, int>
#define vi vector<int>
#define vii vector<ii>
#define F first
#define S second
#define rep(i, a, b) for (int i... | #include <bits/stdc++.h>
using namespace std;
typedef long double ld; // XD
#define int long long
#define PB push_back
#define all(x) (x).begin(), (x).end()
#define ii pair<int, int>
#define mii map<int, int>
#define vi vector<int>
#define vii vector<ii>
#define F first
#define S second
#define rep(i, a, b) for (int i... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 596 |
/*
Author : manu_sy
*/
#include "bits/stdc++.h"
using namespace std;
/** Template Begins **/
typedef long long ll;
typedef pair<int, int> PII;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.ti... | /*
Author : manu_sy
*/
#include "bits/stdc++.h"
using namespace std;
/** Template Begins **/
typedef long long ll;
typedef pair<int, int> PII;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.ti... | [["+", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 3... | 1 | 707 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X;
cin >> X;
X /= 200;
cout << X << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int X;
cin >> X;
X /= 200;
cout << 10 - X << endl;
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33]] | 1 | 32 |
#include <iostream>
#include <stdlib.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n >= 400 && n <= 599) {
cout << 8;
}
if (n >= 600 && n <= 799) {
cout << 7;
}
if (n >= 800 && n <= 999) {
cout << 6;
}
if (n >= 1000 && n <= 1199) {
cout << 5;
}
if (n >= 1200 && n <= 139... | #include <iostream>
#include <stdlib.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n >= 400 && n <= 599) {
cout << 8;
}
if (n >= 600 && n <= 799) {
cout << 7;
}
if (n >= 800 && n <= 999) {
cout << 6;
}
if (n >= 1000 && n <= 1199) {
cout << 5;
}
if (n >= 1200 && n <= 139... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 152 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U> inline bool chmin(T &x, U y) {
if (x > y) {
x = y;
return true;
}
return false;
}
template <class T, class U> inline bool chmax(T &x, U y) {
if (x < y) {
x = y;
return true;
}
return false;
}
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U> inline bool chmin(T &x, U y) {
if (x > y) {
x = y;
return true;
}
return false;
}
template <class T, class U> inline bool chmax(T &x, U y) {
if (x < y) {
x = y;
return true;
}
return false;
}
#def... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["-", 0, 16, 31, 16, 12, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 13]] | 1 | 185 |
// J'aime
// Chemise Blanche
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int, int>
#define fi first
#define sc second
#define all(x) (x).begin(), (x).end()
#define dbg(x) cerr << __LINE__ << " > " << #x << " = " << (x) << endl
void MAIN() {
int x;
cin >> x;
if (x < 600... | // J'aime
// Chemise Blanche
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int, int>
#define fi first
#define sc second
#define all(x) (x).begin(), (x).end()
#define dbg(x) cerr << __LINE__ << " > " << #x << " = " << (x) << endl
void MAIN() {
int x;
cin >> x;
if (x < 600... | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 204 |
import java.io.*;
class Main {
static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int x = Integer.parseInt(br.readLine());
if (x >= 400 && x < 600)
System.out.println("8");
else if (x >= 600 && x < 800)
System.out.... | import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int x = Integer.parseInt(br.readLine());
if (x >= 400 && x < 600)
System.out.println("8");
else if (x >= 600 && x < 800)
Syst... | [["+", 0, 235, 8, 498, 0, 195, 0, 494, 0, 259]] | 3 | 228 |
n = int(input())
print(10 - (n // 2)) | n = int(input())
print(10 - (n // 200)) | [["-", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612]] | 5 | 18 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 402 |
a = input()
if a>=400 and a<600:print(8)
elif a>=600 and a<800:print(7)
elif a>=800 and a<1000:print(6)
elif a>=1000 and a<1200:print(5)
elif a>=1200 and a<1400:print(4)
elif a>=1400 and a<1600:print(3)
elif a>=1600 and a<1800:print(2)
elif a>=1800 and a<2000:print(1) | a = int(input())
if a>=400 and a<600:print(8)
elif a>=600 and a<800:print(7)
elif a>=800 and a<1000:print(6)
elif a>=1000 and a<1200:print(5)
elif a>=1200 and a<1400:print(4)
elif a>=1400 and a<1600:print(3)
elif a>=1600 and a<1800:print(2)
elif a>=1800 and a<2000:print(1) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 109 |
def kyuu(N):
for i in range(1,9):
if N >= 1800 - 200 * i:
return (i + 1)
break
X = int(input())
print(kyuu(X))
| def kyuu(N):
for i in range(8):
if N >= 1800 - 200 * i:
return (i + 1)
break
X = int(input())
print(kyuu(X)) | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 47 |
print([8,7,6,5,4,3,2,1][(input()-400) // 200 ]) | print([8,7,6,5,4,3,2,1][(int(input())-400) // 200 ]) | [["+", 206, 657, 31, 23, 0, 657, 31, 652, 63, 22], ["+", 31, 23, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 31 |
#include <bits/stdc++.h>
#include <string.h>
#define ll long long int
#define SP \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
using namespace std;
int main() {
SP;
int x;
int kyu;
if (x ... | #include <bits/stdc++.h>
#include <string.h>
#define ll long long int
#define SP \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
using namespace std;
int main() {
SP;
int x;
int kyu;
cin >> ... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 155 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int A;
int B = 0;
for (int i = 1800; i >= 400; i -= 200) {
B++;
if (i <= A) {
cout << B << endl;
brea... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int A;
cin >> A;
int B = 0;
for (int i = 1800; i >= 400; i -= 200) {
B++;
if (i <= A) {
cout << B << endl... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 80 |
#include <bits/stdc++.h>
using namespace std;
#define FASTIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef long lon... | #include <bits/stdc++.h>
using namespace std;
#define FASTIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef long lon... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 175 |
/*==============================================*\
Codeforces ID: mdshihab
|
Name: Md. Shihabul Minhaz |
Study: CSE, JKKNIU |
Address: Trishal, Mymensingh, Bangladesh |
... | /*==============================================*\
Codeforces ID: mdshihab
|
Name: Md. Shihabul Minhaz |
Study: CSE, JKKNIU |
Address: Trishal, Mymensingh, Bangladesh |
... | [["-", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["-", 8, 9, 0, 43, 49, 53, 54, 55, 0, 24], ["-", 8, 9, 0, 43, 49, 53, 54, 55, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 196 |
/*
*/
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repb(i, a, b) for (int i = a; i < b; i++)
#... | /*
*/
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repb(i, a, b) for (int i = a; i < b; i++)
#... | [["-", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13]] | 1 | 115 |
#include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace std;
int main() {
I... | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace std;
int main() {
I... | [["-", 75, 76, 0, 57, 64, 1, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 64, 1, 0, 16, 12, 13]] | 1 | 147 |
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/rope"
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("O3")
//#pragma GCC optimization ("unroll-loops")
//#pragma c... | #include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/rope"
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("O3")
//#pragma GCC optimization ("unroll-loops")
//#pragma c... | [["-", 0, 30, 0, 14, 8, 9, 0, 171, 0, 184], ["+", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 171, 0, 1, 0, 23, 0, 25, 0, 35], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 30, 0, 14, 8, 9, 0, 171, 0, 168], ["+", 0, 14, 8, 9, 0, ... | 1 | 1,658 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int x;
cin >> x;
if (x >= 499 && x <= 599) {
cout << "8" << endl;
}
else if (x >= 600 && x <= 799) {
cout << "7" << endl;
}
else if (x >= 800 && x <= 999) {
cout << "6" << endl;
}
els... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int x;
cin >> x;
if (x >= 400 && x <= 599) {
cout << "8" << endl;
}
else if (x >= 600 && x <= 799) {
cout << "7" << endl;
}
else if (x >= 800 && x <= 999) {
cout << "6" << endl;
}
els... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 203 |
score = [1800,1600,1400,1200,1000, 800, 600, 400]
ranks = [ 1, 2, 3, 4, 5, 6, 7, 8]
x = int(input())
i = 0
while(x <= score[i]):
i += 1
print(ranks[i])
| score = [1800,1600,1400,1200,1000, 800, 600, 400]
ranks = [ 1, 2, 3, 4, 5, 6, 7, 8]
x = int(input())
i = 0
while(x < score[i]):
i += 1
print(ranks[i]) | [["-", 0, 656, 0, 52, 15, 23, 0, 666, 667, 19], ["+", 0, 656, 0, 52, 15, 23, 0, 666, 667, 18]] | 5 | 69 |
print(10-int(input())) | print(10-int(input())//200)
| [["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 676], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]] | 5 | 11 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (10 - n % 200) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (10 - n / 200) << endl;
} | [["-", 31, 16, 12, 23, 0, 16, 12, 16, 17, 109], ["+", 31, 16, 12, 23, 0, 16, 12, 16, 17, 85]] | 1 | 31 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
if (x >= 400 && x <= 599) {
cout << "8";
} else if (x >= 600 && x <= 799) {
cout << "7";
} else if (x >= 800 && x <= 999) {
cout << "6";
} else if (x >= 1000 && x <= 1199) {
cout << "5";
} else if (x >= 1200 && x <... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
if (x >= 400 && x <= 599) {
cout << "8";
} else if (x >= 600 && x <= 799) {
cout << "7";
} else if (x >= 800 && x <= 999) {
cout << "6";
} else if (x >= 1000 && x <= 1199) {
cout << "5";
} else if (x >= 1200 && x <... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 170 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n >= 1 && n <= 199)
cout << 10;
else if (n >= 200 && n <= 399)
cout << 9;
else if (n >= 400 && n <= 599)
cout << 8;
else if (n >= 600 && n <= 799)
cout << 7;
else if (n >= 800 && n <= 999)
cout << 6;
else if (... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n >= 1 && n <= 199)
cout << 10;
else if (n >= 200 && n <= 399)
cout << 9;
else if (n >= 400 && n <= 599)
cout << 8;
else if (n >= 600 && n <= 799)
cout << 7;
else if (n >= 800 && n <= 999)
cout << 6;
else if (... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 168 |
<?php
$x = sscanf(STDIO);
$get9 = function($x) {
if ($x <= 599) return 8;
if ($x <= 799) return 7;
if ($x <= 999) return 6;
if ($x <= 1199) return 5;
if ($x <= 1399) return 4;
if ($x <= 1599) return 3;
if ($x <= 1799) return 2;
if ($x <= 1999) return 1;
};
echo $get9($x); | <?php
$x = trim(fgets(STDIN));
$get9 = function($x) {
if ($x <= 599) return 8;
if ($x <= 799) return 7;
if ($x <= 999) return 6;
if ($x <= 1199) return 5;
if ($x <= 1399) return 4;
if ($x <= 1599) return 3;
if ($x <= 1799) return 2;
if ($x <= 1999) return 1;
};
echo $get9($x); | [["-", 0, 493, 0, 1, 0, 11, 12, 613, 63, 141], ["+", 0, 493, 0, 1, 0, 11, 12, 613, 63, 141], ["-", 0, 11, 12, 613, 3, 3, 0, 28, 0, 141], ["+", 12, 613, 3, 3, 0, 28, 0, 613, 63, 141], ["+", 3, 3, 0, 28, 0, 613, 3, 3, 0, 24], ["+", 0, 28, 0, 613, 3, 3, 0, 28, 0, 141], ["+", 3, 3, 0, 28, 0, 613, 3, 3, 0, 25]] | 6 | 108 |
n=int(input())
if 599>=n>=400:
print(8)
elif 799>=n>=600:
print(7)
elif 999>=n>=800:
print(6)
elif 1199>=n>=1000:
print(5)
elif 1399>=n>=1200:
print(4)
elif 1400>=n>=1599:
print(3)
elif 1799>=n>=1600:
print(2)
elif 1999>=n>=1800:
print(1) | n=int(input())
if 599>=n>=400:
print(8)
elif 799>=n>=600:
print(7)
elif 999>=n>=800:
print(6)
elif 1199>=n>=1000:
print(5)
elif 1399>=n>=1200:
print(4)
elif 1599>=n>=1400:
print(3)
elif 1799>=n>=1600:
print(2)
elif 1999>=n>=1800:
print(1) | [["-", 0, 656, 0, 57, 75, 665, 15, 666, 0, 612], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 612]] | 5 | 96 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1e9, mod = 1e9 + 7;
#define endl '\n'
void solve() {
int n;
cin >> n;
if (n >= 400 and n <= 599)
cout << 8 << endl;
if (n >= 600 and n <= 799)
cout << 7 << endl;
if (n >= 800 and n <= 999)
cout << 6 << endl;
if ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1e9, mod = 1e9 + 7;
#define endl '\n'
void solve() {
int n;
cin >> n;
if (n >= 400 and n <= 599)
cout << 8 << endl;
if (n >= 600 and n <= 799)
cout << 7 << endl;
if (n >= 800 and n <= 999)
cout << 6 << endl;
if ... | [["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13]] | 1 | 194 |
# -*- coding: utf-8 -*-
def main():
import sys
input = sys.stdin.readline
x = int(input())
if x >= 1800:
print('1')
elif x >= 1600:
print('2')
elif x >= 1400:
print('3')
elif x >= 1200:
print('4')
elif x >= 1000:
print('5')
elif x >= 800:
... | # -*- coding: utf-8 -*-
def main():
import sys
input = sys.stdin.readline
x = int(input())
if x >= 1800:
print('1')
elif x >= 1600:
print('2')
elif x >= 1400:
print('3')
elif x >= 1200:
print('4')
elif x >= 1000:
print('5')
elif x >= 800:
... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 121 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n >= 400 && n < 600)
cout << 8;
else if (n >= 600 && n < 800)
cout << 7;
else if (n >= 800 && n < 1000)
cout << 6;
else if (n >= 1000 && n < 1100)
cout << 5;
else if (n >= 1200 && n < 1400)
cout << 4;
els... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n >= 400 && n < 600)
cout << 8;
else if (n >= 600 && n < 800)
cout << 7;
else if (n >= 800 && n < 1000)
cout << 6;
else if (n >= 1000 && n < 1200)
cout << 5;
else if (n >= 1200 && n < 1400)
cout << 4;
els... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 141 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
const ll INF = 10e9;
ll MOD = 1000000007;
int main() {
int x;
cin >> x;
cout << x / 200;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
const ll INF = 10e9;
ll MOD = 1000000007;
int main() {
int x;
cin >> x;
cout << 10 - (x / 200);
} | [["+", 8, 9, 0, 1, 0, 16, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 25]] | 1 | 50 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
const ll INF = 10e9;
int main() {
int x;
cin >> x;
if (x >= 400 && x <= 500)
cout << 8;
else if (x <= 799)
cout << 7;
else if (x <= 999)
cout << 6;
else if (x <= 1199)
cout << 5... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
const ll INF = 10e9;
int main() {
int x;
cin >> x;
if (x <= 599)
cout << 8;
else if (x <= 799)
cout << 7;
else if (x <= 999)
cout << 6;
else if (x <= 1199)
cout << 5;
else if ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 130 |
score = int(input())
levelList = [600,800,1000,1200,1400,1600]
level = 8
for i in range(6):
if score < levelList[i]:
break
else :
level = level - 1
print(level) | score = int(input())
levelList = [600,800,1000,1200,1400,1600,1800]
level = 8
for i in range(7):
if score < levelList[i]:
break
else :
level = level - 1
print(level) | [["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 54 |
#include <bits/stdc++.h>
#define Yes cout << "Yes" << endl;
#define No cout << "No" << endl;
#define ll long long int
using namespace std;
int main() {
ll tc, a, b, c, n, x, y, z, cnt = 0, sum = 0;
string str;
cin >> x;
if (x >= 400 && x < 600)
cout << 8 << endl;
else if (x >= 600 && x < 800)
cout << ... | #include <bits/stdc++.h>
#define Yes cout << "Yes" << endl;
#define No cout << "No" << endl;
#define ll long long int
using namespace std;
int main() {
ll tc, a, b, c, n, x, y, z, cnt = 0, sum = 0;
string str;
cin >> x;
if (x >= 400 && x < 600)
cout << 8 << endl;
else if (x >= 600 && x < 800)
cout << ... | [["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13]] | 1 | 188 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define endl '\n'
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define endl '\n'
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 465 |
x = int(input())
if 400<=x and x<=599:
print(8)
if 600<=x and x<=799:
print(7)
if 800<=x and x<=999:
print(6)
if 1000<=x and x<=1199:
print(5)
if 1200<=x and x<=1399:
print(4)
if 1400<=x and x<=1599:
print(3)
if 1500<=x and x<=1799:
print(2)
if 1600<=x and x<=1999:
print(1)
exit()
| x = int(input())
if 400<=x and x<=599:
print(8)
if 600<=x and x<=799:
print(7)
if 800<=x and x<=999:
print(6)
if 1000<=x and x<=1199:
print(5)
if 1200<=x and x<=1399:
print(4)
if 1400<=x and x<=1599:
print(3)
if 1600<=x and x<=1799:
print(2)
if 1800<=x and x<=1999:
print(1)
exit()
| [["-", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612]] | 5 | 115 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int X, ans = 1, x = 1799;
cin >> X;
while (x > X) {
x = x - 200;
ans++;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int X, ans = 1, x = 1800;
cin >> X;
while (x > X) {
x = x - 200;
ans++;
}
cout << ans << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 67 |
/*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 331 |
/*=============================================================================================================================/*
Bismillahir Rahmanir Rahim
_ ____ ___ ____ _ _ _ ___ ____ _ _ __ __
/ \ / ___||_ _|| __ ) | | |... | /*=============================================================================================================================/*
Bismillahir Rahmanir Rahim
_ ____ ___ ____ _ _ _ ___ ____ _ _ __ __
/ \ / ___||_ _|| __ ) | | |... | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]] | 1 | 346 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.