Submission #55830

# Submission time Handle Problem Language Result Execution time Memory
55830 2018-07-09T05:35:11 Z 정원준(#1565) Sushi (JOI16_sushi) C++11
0 / 100
140 ms 4820 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);
		printf("%lld\n",Q.top());
		Q.pop();
		Q.push(z);
	}
}

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);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 140 ms 4820 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -