Submission #743028

# Submission time Handle Problem Language Result Execution time Memory
743028 2023-05-17T07:29:52 Z vjudge1 Lightning Rod (NOI18_lightningrod) C++17
0 / 100
2000 ms 168168 KB
#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

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 time Memory Grader output
1 Execution timed out 2084 ms 168168 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2053 ms 163352 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2084 ms 168168 KB Time limit exceeded
2 Halted 0 ms 0 KB -