제출 #29815

#제출 시각아이디문제언어결과실행 시간메모리
29815aybalaRobots (IOI13_robots)C++11
0 / 100
229 ms6316 KiB
#include "robots.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(int a=b; a<c; a++)
#define ford(a,b,c) for(int a=b; a>=c; a--)
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;

bool a[2][2];

int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
	fori(i,0,2){
		int k=0;
		fori(j,0,A){
			if(W[i]<X[j]){
				a[j][i]=1;
			}
			k++;
		}
		
		fori(j,0,B){
			if(S[i]<Y[k]){
				a[k][i]=1;
			}
			k++;
		}
	}
	
	if(a[0][0]==0 && a[0][1]==0 && a[1][0]==0 && a[1][1]==0){
		return -1;
	}
	
	if(a[0][0]==0 && a[0][1]==0 && a[1][0]==1 && a[1][1]==1 ){
		return 2;
	}
	
	if(a[1][0]==0 && a[1][1]==0 && a[0][0]==1 && a[0][1]==1 ){
		return 2;
	}
	
  	if(a[0][0]==1 && a[0][1]==0 && a[1][0]==1 && a[1][1]==0){
		return -1;
	}
  
  	if(a[0][0]==0 && a[0][1]==1 && a[1][0]==0 && a[1][1]==1){
		return -1;
	}
  
	return 1;
}





#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...