QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#335302#8067. Scientific GradingevirirRE 0ms3976kbC++202.1kb2024-02-23 07:57:482024-02-23 07:57:48

Judging History

This is the latest submission verdict.

  • [2024-02-23 07:57:48]
  • Judged
  • Verdict: RE
  • Time: 0ms
  • Memory: 3976kb
  • [2024-02-23 07:57:48]
  • Submitted

answer

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#define watch(x) cout<<(#x)<<"="<<(x)<<'\n'
#define mset(d,val) memset(d,val,sizeof(d))
#define cbug if(DEBUG) cout
#define setp(x) cout<<fixed<<setprecision(x)
#define sz(x) (int)(x).size()
#define all(x) begin(x), end(x)
#define forn(i,a,b) for(int i=(a);i<(b);i++)
#define fore(i,a,b) for(int i=(a);i<=(b);i++)
#define pb push_back
#define F first
#define S second
#define fbo find_by_order
#define ook order_of_key
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> ii;
typedef vector<ll> vi;
typedef vector<ii> vii;
//template<typename T>
//using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
void SD(int t=0){ cout<<"PASSED "<<t<<endl; }
ostream& operator<<(ostream &out, ii x){ out<<"("<<x.F<<","<<x.S<<")"; return out; }
template<typename T> void amax(T &a, T b){ a=max(a,b); }
template<typename T> void amin(T &a, T b){ a=min(a,b); }
struct Hash {
	static uint64_t splitmix64(uint64_t x) {
		// http://xorshift.di.unimi.it/splitmix64.c
		x += 0x9e3779b97f4a7c15;
		x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
		x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
		return x ^ (x >> 31);
	}
	size_t operator()(uint64_t x) const {
		static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
		return splitmix64(x + FIXED_RANDOM);
	}
};

const ll INF = ll(1e18);
const int MOD = 998244353;
const bool DEBUG = 0;
const int MAXN = 100005;
const int LG = 21;

ld read()
{
	string s; cin>>s;
	return stold(s);
}

void close(ld x, ld y)
{
	bool ok = fabsl(x - y) <= 1e-9L && fabsl(x - y) / fabsl(y) <= 1e-9L;
	if (ok) cout<<"Correct\n";
	else cout<<"Incorrect\n";
}

int main()
{
	cin.tie(0)->sync_with_stdio(0);

	double x,y,a[4];
	x = read();
	y = read();
	forn(i,0,4) a[i] = read();

	close(a[0], x + y);
	close(a[1], x - y);
	close(a[2], x * y);
	close(a[3], x / y);

	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

+2.000000000e+1
+3.000000000e+2
+3.200000000e+2
-2.800000000e+2
+6.000000000e+3
+6.666666667e-2

output:

Correct
Correct
Correct
Correct

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

+1.000000000e-1
+1.000000000e-1
+2.000000003e-1
+1.000000000e-18
+1.000000002e-2
+1.000000001e+0

output:

Incorrect
Incorrect
Incorrect
Incorrect

result:

ok 4 lines

Test #3:

score: -100
Runtime Error

input:

+9.999999999e+400000000
+1.000000000e-400000009
+9.999999999e+400000000
+9.999999999e+400000000
+9.999999999e-9
+9.999999999e+800000009

output:


result: