Submission #148904

# Submission time Handle Problem Language Result Execution time Memory
148904 2019-09-01T05:20:52 Z HSNU(#3687, joylintp, 147, wiwiho) Crosses on the Grid (FXCUP4_cross) C++17
8 / 100
98 ms 3692 KB
#include "cross.h"

//#define NDEBUG
 
#include <bits/stdc++.h>
 
#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define F first
#define S second
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
    if(pvaspace) b << " "; pvaspace=true;\
    b << pva;\
}\
b << "\n";}
#define pii pair<int, int>
#define pll pair<ll, ll>
#define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD)
#define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD)
 
//#define TEST
 
typedef long long ll;
typedef unsigned long long ull;
 
using namespace std;
 
const ll MOD = 1000000007;
const ll MAX = 2147483647;

long long SelectCross(int K, std::vector<int> I, std::vector<int> O) {
	ll ans = 0;
	for(int i = 0; i < I.size(); i++){
		ans = max(ans, (ll)O[i] * O[i] - (ll)(O[i] - I[i]) * (O[i] - I[i]));
	}
	return ans;
}

Compilation message

cross.cpp: In function 'long long int SelectCross(int, std::vector<int>, std::vector<int>)':
cross.cpp:42:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < I.size(); i++){
                 ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 128 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 11 ms 512 KB Output is correct
6 Correct 98 ms 3692 KB Output is correct
7 Correct 98 ms 3692 KB Output is correct
8 Correct 95 ms 3692 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 128 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 11 ms 512 KB Output is correct
6 Correct 98 ms 3692 KB Output is correct
7 Correct 98 ms 3692 KB Output is correct
8 Correct 95 ms 3692 KB Output is correct
9 Incorrect 5 ms 384 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 128 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 11 ms 512 KB Output is correct
6 Correct 98 ms 3692 KB Output is correct
7 Correct 98 ms 3692 KB Output is correct
8 Correct 95 ms 3692 KB Output is correct
9 Incorrect 5 ms 384 KB Output isn't correct
10 Halted 0 ms 0 KB -