Submission #1017332

# Submission time Handle Problem Language Result Execution time Memory
1017332 2024-07-09T07:25:31 Z vjudge1 Feast (NOI19_feast) C++17
4 / 100
32 ms 2704 KB
#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O2")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#define ll long long
#define ld long double
#define namein "tallbarn.in"
#define nameout "tallbarn.out"
#define pll pair<ll, ll>
#define pii pair<int, int>
#define pb push_back
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpll vector<pll>
#define vpii vector<pii>
#define fr(i, j, n) for (ll i = j; i <= n; i++)
using namespace std;
const ll mod = 1e9 + 7;
const ll inf = LLONG_MAX;
const ll maxn = 3e5 + 5;

void boost(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}

void file(){
	if (fopen(namein, "r")){
		freopen(namein, "r", stdin);
		freopen(nameout, "w", stdout);
	}
}

ll n, k, s = 0;
ll a[maxn];

void ans(){
	cin >> n >> k;
	for (ll i = 1; i <= n; i++){
		cin >> a[i];
		s += a[i];
	}
	cout << s;
}

int main(){
	boost();
	file();
	ans();
}

Compilation message

feast.cpp: In function 'void file()':
feast.cpp:71:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   71 |   freopen(namein, "r", stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~
feast.cpp:72:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   72 |   freopen(nameout, "w", stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 19 ms 2652 KB Output is correct
2 Correct 20 ms 2692 KB Output is correct
3 Correct 20 ms 2704 KB Output is correct
4 Correct 20 ms 2652 KB Output is correct
5 Correct 21 ms 2688 KB Output is correct
6 Correct 25 ms 2652 KB Output is correct
7 Correct 32 ms 2688 KB Output is correct
8 Correct 25 ms 2648 KB Output is correct
9 Correct 31 ms 2652 KB Output is correct
10 Correct 19 ms 2652 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 2648 KB Output is correct
2 Correct 13 ms 2652 KB Output is correct
3 Incorrect 12 ms 2652 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 2652 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 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 19 ms 2652 KB Output is correct
2 Correct 20 ms 2692 KB Output is correct
3 Correct 20 ms 2704 KB Output is correct
4 Correct 20 ms 2652 KB Output is correct
5 Correct 21 ms 2688 KB Output is correct
6 Correct 25 ms 2652 KB Output is correct
7 Correct 32 ms 2688 KB Output is correct
8 Correct 25 ms 2648 KB Output is correct
9 Correct 31 ms 2652 KB Output is correct
10 Correct 19 ms 2652 KB Output is correct
11 Correct 13 ms 2648 KB Output is correct
12 Correct 13 ms 2652 KB Output is correct
13 Incorrect 12 ms 2652 KB Output isn't correct
14 Halted 0 ms 0 KB -