Submission #68534572
Source Code Expand
#include <bits/stdc++.h> #include <stdlib.h> #include <time.h> using namespace std; double EPS = 1e-12; typedef long long int lld; typedef pair<lld,lld> PA; long double tick(){static clock_t oldt; clock_t newt=clock(); long double diff=1.0L*(newt-oldt)/CLOCKS_PER_SEC; oldt = newt; return diff; } #define rep(i,a,n) for(long long int i = (a); i <= (n); ++i) #define repI(i,a,n) for(int i = (a); i <= (n); ++i) #define repD(i,a,n) for(long long int i = (a); i >= (n); --i) #define repDI(i,a,n) for(int i = (a); i >= (n); --i) #define all(c) (c).begin(), (c).end() #define sz(a) ((int)a.size()) #ifdef LOCAL_RUN #define Error(x...) { cout << "(" << #x << ")" << " = ( "; printIt(x); } #else #define Error(x...) 42 #endif template <typename T1> void printIt(T1 t1) { cout << t1 << " )" << endl; } template <typename T1, typename... T2> void printIt(T1 t1, T2... t2) { cout << t1 << " , "; printIt(t2...); } // Ab :) #define popcount __builtin_popcountll #define lim 300010 #define lim2 200010 lld A[lim]; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int qq; cin >> qq; multiset<lld> ms; while(qq--){ int type; cin >> type; if(type == 1){ lld x; cin >> x; ms.insert(x); } else if(type == 2){ lld x = *ms.begin(); ms.erase(ms.find(x)); cout << x << endl; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Get Min |
User | abhishek_saini |
Language | C++ 20 (gcc 12.2) |
Score | 200 |
Code Size | 1491 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3600 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample00.txt, sample01.txt |
All | sample00.txt, sample01.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample00.txt | AC | 1 ms | 3512 KiB |
sample01.txt | AC | 1 ms | 3440 KiB |
testcase00.txt | AC | 1 ms | 3428 KiB |
testcase01.txt | AC | 1 ms | 3600 KiB |
testcase02.txt | AC | 1 ms | 3440 KiB |
testcase03.txt | AC | 1 ms | 3516 KiB |
testcase04.txt | AC | 1 ms | 3460 KiB |
testcase05.txt | AC | 1 ms | 3408 KiB |
testcase06.txt | AC | 1 ms | 3512 KiB |
testcase07.txt | AC | 1 ms | 3460 KiB |
testcase08.txt | AC | 1 ms | 3480 KiB |
testcase09.txt | AC | 1 ms | 3480 KiB |
testcase10.txt | AC | 1 ms | 3464 KiB |
testcase11.txt | AC | 1 ms | 3388 KiB |
testcase12.txt | AC | 1 ms | 3464 KiB |
testcase13.txt | AC | 1 ms | 3528 KiB |
testcase14.txt | AC | 1 ms | 3448 KiB |
testcase15.txt | AC | 1 ms | 3400 KiB |
testcase16.txt | AC | 1 ms | 3388 KiB |
testcase17.txt | AC | 1 ms | 3528 KiB |
testcase18.txt | AC | 1 ms | 3420 KiB |