Submission #676757

# Submission time Handle Problem Language Result Execution time Memory
676757 2023-01-01T03:45:56 Z Ninja_Kunai Catfish Farm (IOI22_fish) C++17
0 / 100
24 ms 4052 KB
/**
*    Author :  Nguyen Tuan Vu
*    Created : 01.01.2023
**/

#pragma GCC optimize("O2")
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#define MASK(x) ((1ll)<<(x))
#define BIT(x, i) (((x)>>(i))&(1))
#define ALL(v)  (v).begin(), (v).end()
#define REP(i, n)  for (int i = 0, _n = (n); i < _n; ++i)
#define FOR(i, a, b)  for (int i = (a), _b = (b); i <= _b; ++i) 
#define FORD(i, b, a)  for (int i = (b), _a = (a); i >= _a; --i)
#define db(val) "["#val" = "<<(val)<<"] "

template <class X, class Y> bool minimize(X &a, Y b) {
    if (a > b) return a = b, true;
    return false;
}
template <class X, class Y> bool maximize(X &a, Y b) {
    if (a < b) return a = b, true;
    return false;
}

using namespace std;

mt19937 jdg(chrono::steady_clock::now().time_since_epoch().count());
int Rand(int l, int r) {return l + jdg() % (r - l + 1);}

namespace sub1 {
	bool check(int m, vector <array <int, 3>> fishes) {
		FOR(i, 1, m) {
			if (fishes[i][0] & 1) return false;
		}

		return true;
	}

	long long solve(int m, vector <array <int, 3>> fishes) {
		//assert(1 == 0);
		long long ans = 0;
		FOR(i, 1, m) ans += fishes[i][2];
		return ans;
	}
}

long long max_weights(int n, int m, vector <int> X, vector <int> Y, vector <int> W) {
	vector <array <int, 3>> fishes;
	fishes.resize(m + 7);
	FOR(i, 1, m) fishes[i] = {X[i], Y[i], W[i]};

	if (sub1::check(m, fishes)) return sub1::solve(m, fishes);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 4052 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '40313217677446'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '2', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '10082010', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '10082010', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 4052 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '40313217677446'
2 Halted 0 ms 0 KB -