Submission #1847631
Source Code Expand
#include<iostream> #include<algorithm> using namespace std; struct f{ long long int x; long long int y; }ff[100005]; bool cmp(f a,f b) { return a.x<b.x; } int main() { int a,b; long long int s=0; cin>>a>>b; for(int i =0;i<a;i++) cin>>ff[i].x>>ff[i].y; sort(ff,ff+a,cmp); for(int i =0;i<a;i++) { s+=ff[i].y; if(s>=b) { cout<<ff[i].x<<endl; break; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Between Two Integers |
User | Hughhhhhhh |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 423 Byte |
Status | RE |
Exec Time | 101 ms |
Memory | 1792 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.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 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 1 ms | 256 KB |
sample_02.txt | WA | 1 ms | 256 KB |
sample_03.txt | WA | 1 ms | 256 KB |
subtask_1_1.txt | WA | 1 ms | 256 KB |
subtask_1_2.txt | WA | 1 ms | 256 KB |
subtask_1_3.txt | RE | 101 ms | 1792 KB |
subtask_1_4.txt | RE | 100 ms | 1792 KB |
subtask_1_5.txt | RE | 101 ms | 1792 KB |
subtask_1_6.txt | RE | 100 ms | 1792 KB |
subtask_1_7.txt | RE | 101 ms | 1792 KB |