Submission #1779598
Source Code Expand
#include <map> #include <set> #include <list> #include <cmath> #include <deque> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <complex> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <utility> #include <iostream> #include <algorithm> #include <functional> using namespace std; #define INF (1 << 30) #define INFL (1LL << 62) #define MOD7 1000000007 #define MOD9 1000000009 #define EPS 1e-10 #define ll long long #define ull unsigned long long #define pii pair<int, int> #define pll pair<ll, ll> #define pul pair<ull, ull> #define all(a) (a).begin(), (a).end() #define mp make_pair #define pb push_back #define FOR(i,a,b) for (int i=(a);i<(b);++i) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);--i) #define REP(i,n) for (int i=0;i<(n);++i) #define RREP(i,n) for (int i=(n)-1;i>=0;--i) void YES() { cout << "YES" << endl; } void NO() { cout << "NO" << endl; } void Yes() { cout << "Yes" << endl; } void No() { cout << "No" << endl; } void yes() { cout << "yes" << endl; } void no() { cout << "no" << endl; } void Taka() { cout << "Takahashi" << endl; } void Aoki() { cout << "Aoki" << endl; } void digit(int d) { cout << fixed << setprecision(d); } void IOup() { cin.tie(0); ios::sync_with_stdio(false); } int c[100001]; int main() { int n, k, a, b; cin >> n >> k; while (n--) { cin >> a >> b; c[a] += b; } ll cnt = 1; for (int i = 1; ; ++i) { if (cnt <= k && k <= cnt + c[i]) { cout << i << endl; break; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Big Array |
User | temple |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1605 Byte |
Status | RE |
Exec Time | 169 ms |
Memory | 640 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | sample_01.txt, sample_02.txt, subtask_1_1.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt, subtask_1_8.txt, subtask_1_9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
subtask_1_1.txt | RE | 97 ms | 640 KB |
subtask_1_10.txt | RE | 102 ms | 256 KB |
subtask_1_11.txt | RE | 100 ms | 256 KB |
subtask_1_12.txt | RE | 100 ms | 256 KB |
subtask_1_13.txt | RE | 100 ms | 256 KB |
subtask_1_14.txt | RE | 100 ms | 256 KB |
subtask_1_15.txt | RE | 100 ms | 256 KB |
subtask_1_2.txt | RE | 101 ms | 640 KB |
subtask_1_3.txt | RE | 120 ms | 640 KB |
subtask_1_4.txt | RE | 142 ms | 640 KB |
subtask_1_5.txt | RE | 169 ms | 640 KB |
subtask_1_6.txt | RE | 100 ms | 256 KB |
subtask_1_7.txt | RE | 98 ms | 640 KB |
subtask_1_8.txt | WA | 6 ms | 640 KB |
subtask_1_9.txt | RE | 132 ms | 640 KB |