답안 #55832

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
55832 2018-07-09T05:36:28 Z 정원준(#1565) Sushi (JOI16_sushi) C++11
15 / 100
168 ms 5016 KB
#include <bits/stdc++.h>
#define L long long

using namespace std;

L n,m;

priority_queue<L>Q;

int main()
{
	scanf("%lld %lld",&n,&m);
	L i;
	for(i=1;i<=n;i++)
	{
		L x;
		scanf("%lld",&x);
		Q.push(x);
	}
	for(i=1;i<=m;i++)
	{
		L x,y,z;
		scanf("%lld %lld %lld",&x,&y,&z);
		Q.push(z);
		printf("%lld\n",Q.top());
		Q.pop();
	}
}

Compilation message

telegraph.cpp: In function 'int main()':
telegraph.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld",&n,&m);
  ~~~~~^~~~~~~~~~~~~~~~~~~
telegraph.cpp:17:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&x);
   ~~~~~^~~~~~~~~~~
telegraph.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %lld %lld",&x,&y,&z);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 125 ms 4644 KB Output is correct
2 Correct 91 ms 4724 KB Output is correct
3 Correct 57 ms 4756 KB Output is correct
4 Correct 130 ms 4756 KB Output is correct
5 Correct 153 ms 4912 KB Output is correct
6 Correct 168 ms 4928 KB Output is correct
7 Correct 107 ms 4928 KB Output is correct
8 Correct 94 ms 4980 KB Output is correct
9 Correct 61 ms 5016 KB Output is correct
10 Correct 113 ms 5016 KB Output is correct
11 Correct 78 ms 5016 KB Output is correct
12 Correct 103 ms 5016 KB Output is correct
13 Correct 126 ms 5016 KB Output is correct
14 Correct 107 ms 5016 KB Output is correct
15 Correct 91 ms 5016 KB Output is correct
16 Correct 141 ms 5016 KB Output is correct
17 Correct 117 ms 5016 KB Output is correct
18 Correct 100 ms 5016 KB Output is correct
19 Correct 107 ms 5016 KB Output is correct
20 Correct 148 ms 5016 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -