Submission #743171

#TimeUsernameProblemLanguageResultExecution timeMemory
743171vjudge1Lightning Rod (NOI18_lightningrod)C++17
0 / 100
1538 ms262144 KiB
#include <bits/stdc++.h> #define x first #define y second using namespace std; const int N = 1e7 + 1; pair<int,int> arr[N]; inline void read(int &x) { x = 0; char ch = getchar_unlocked(); while (ch & 16) { x = (x << 3) + (x << 1) + (ch & 15); ch = getchar_unlocked(); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,ans=0; read(n); for(int i=1;i<=n;i++) { read(arr[i].x); read(arr[i].y); } set<int> s; for(int i=1;i<=n;i++) s.insert(arr[i].x); cout << s.size(); return 0; }

Compilation message (stderr)

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:20:11: warning: unused variable 'ans' [-Wunused-variable]
   20 |     int n,ans=0; read(n);
      |           ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...