Submission #906308

# Submission time Handle Problem Language Result Execution time Memory
906308 2024-01-14T00:51:06 Z vjudge1 Job Scheduling (IOI19_job) C++17
0 / 100
1 ms 348 KB
#include "job.h"
#include <bits/stdc++.h>
using namespace std;

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define F first
#define S second
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

long long scheduling_cost(std::vector<int> p, std::vector<int> u, std::vector<int> d) {
	int n = sz(p);
	bool g1=true;
	bool g2=true;
	rep(i,1,n){
		if(p[i]!=i-1)g1=false;
		if(p[i]!=0)g2=false;
	}
	ll score = 0;
	if(g1){
		ll time = 0;
		rep(i,0,n){
			time += d[i];
			score += d[i]*u[i];
		}
	}else if(g2){
		assert(false);
	}else{
		assert(false);
	}
	return score;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -