Submission #743028

#TimeUsernameProblemLanguageResultExecution timeMemory
743028vjudge1Lightning Rod (NOI18_lightningrod)C++17
0 / 100
2084 ms168168 KiB
#include<iostream> #include<set> #include<map> int n,cnt; std::map<int, bool> mp; int main() { scanf("%d",&n); for(int i = 0; i<n; ++i){ int x,y; scanf("%d %d",&x,&y); if(mp[x]) continue; mp[x] = 1; ++cnt; } printf("%d",cnt); }

Compilation message (stderr)

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
lightningrod.cpp:12:23: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         int x,y; scanf("%d %d",&x,&y);
      |                  ~~~~~^~~~~~~~~~~~~~~
#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...