답안 #373827

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
373827 2021-03-05T20:55:21 Z guka415 Lightning Rod (NOI18_lightningrod) C++14
0 / 100
2000 ms 262148 KB
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <unordered_set>
#include <map>

using namespace std;
typedef pair<int, int> pii;

int n;
unordered_set<int> mem;

int main() {
	int x, y, ret = 0, sum, diff;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d %d", &x, &y);
		mem.insert(x);
		sum = y - x, diff = y + x;
	}
	int prv = -2e9;
	printf("%d", ret);
	return 0;
}

Compilation message

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:14:21: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
   14 |  int x, y, ret = 0, sum, diff;
      |                     ^~~
lightningrod.cpp:14:26: warning: variable 'diff' set but not used [-Wunused-but-set-variable]
   14 |  int x, y, ret = 0, sum, diff;
      |                          ^~~~
lightningrod.cpp:21:6: warning: unused variable 'prv' [-Wunused-variable]
   21 |  int prv = -2e9;
      |      ^~~
lightningrod.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   15 |  scanf("%d", &n);
      |  ~~~~~^~~~~~~~~~
lightningrod.cpp:17:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   17 |   scanf("%d %d", &x, &y);
      |   ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2087 ms 135104 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1903 ms 262148 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2087 ms 135104 KB Time limit exceeded
2 Halted 0 ms 0 KB -