(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #954250

#TimeUsernameProblemLanguageResultExecution timeMemory
954250vjudge1Deda (COCI17_deda)C++17
80 / 140
1065 ms1464 KiB
#include <bits/extc++.h> #include <bits/stdc++.h> #define pii pair<int,int> using namespace __gnu_pbds; using namespace std; tree <pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> s; int main(){ int n, q, m = 0; cin >> n >> q; //no gets off see as inf // while(q){ char op; int a, b; cin >> op >> a >> b; if(op == 'M'){ //a=x,b=studentA s.insert({b,a}); m++; } if(op == 'D'){ //a=Y,b=B >=Bstu,smallest station stu //小於等於Y站的ID(b)y最小的->order(k)if *it.second <= b; int k = 0; while(k < m){ auto it = s.find_by_order(k); if( it->second <= a && it->first >= b){ cout << it->first << endl;//<< " " << it->second << "("<< a << "," << b << ")" << endl; break; } k++; } if(k == m) cout << -1 << endl; } q--; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...