Submission #714705

#TimeUsernameProblemLanguageResultExecution timeMemory
714705dsyzFortune Telling 2 (JOI14_fortune_telling2)C++17
0 / 100
14 ms23768 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MAXN (1000005) int main() { ios_base::sync_with_stdio(false);cin.tie(0); ll N,K; cin>>N>>K; ll A[N], B[N], a[N], b[N]; vector<ll> d; for(ll i = 0;i < N;i++){ cin>>A[i]>>B[i]; a[i] = A[i]; b[i] = B[i]; d.push_back(A[i]); d.push_back(B[i]); } ll T[K]; for(ll i = 0;i < K;i++){ cin>>T[i]; d.push_back(T[i]); } sort(d.begin(),d.end()); d.resize(unique(d.begin(),d.end()) - d.begin()); for(ll i = 0;i < N;i++){ A[i] = lower_bound(d.begin(),d.end(),A[i]) - d.begin(); B[i] = lower_bound(d.begin(),d.end(),B[i]) - d.begin(); } for(ll i = 0;i < K;i++){ T[i] = lower_bound(d.begin(),d.end(),T[i]) - d.begin(); } vector<ll> v[MAXN]; //stores the i for(ll i = 0;i < N;i++){ v[A[i]].push_back(i); v[B[i]].push_back(i); } ll sum = 0; cout<<sum<<'\n'; }

Compilation message (stderr)

fortune_telling2.cpp: In function 'int main()':
fortune_telling2.cpp:9:17: warning: variable 'a' set but not used [-Wunused-but-set-variable]
    9 |  ll A[N], B[N], a[N], b[N];
      |                 ^
fortune_telling2.cpp:9:23: warning: variable 'b' set but not used [-Wunused-but-set-variable]
    9 |  ll A[N], B[N], a[N], b[N];
      |                       ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...