Submission #945869

# Submission time Handle Problem Language Result Execution time Memory
945869 2024-03-14T08:17:34 Z Nika533 Boxes with souvenirs (IOI15_boxes) C++14
0 / 100
1 ms 348 KB
#pragma GCC diagnostic warning "-std=c++11"
#include <bits/stdc++.h>
#include "boxes.h"
#define pb push_back
#define f first
#define s second
#define MOD 1000000007
#define flush fflush(stdout)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define pii pair<int,int>
using namespace std;
int n,m,T,k;
long long delivery(int N, int K, int L, int p[]) {
	long long ans=0;
	for (int i=0; i<N; i++) {
		ans+=min(p[i],L-p[i]);
	}
	return ans;
}

Compilation message

boxes.cpp:1:32: warning: '-std=c++11' is not an option that controls warnings [-Wpragmas]
    1 | #pragma GCC diagnostic warning "-std=c++11"
      |                                ^~~~~~~~~~~~
boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:14:31: warning: unused parameter 'K' [-Wunused-parameter]
   14 | long long delivery(int N, int K, int L, int p[]) {
      |                           ~~~~^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -