Submission #3230303


Source Code Expand

/*
对于一个来说最多只能去掉一种颜色
所以每个a之间差不能超过1 
*/
#include<map> 
#include<vector> 
#include<cstdio> 
#include<cstring> 
#include<algorithm> 
#define gc getchar()
#define pc putchar 
#define LL long long
inline int read() { 
	int x = 0,f = 1; 
	char c = gc; 
	while(c < '0' || c > '9')c = gc; 
	while(c <= '9' && c >= '0') x = x * 10 + c - '0',c = gc; 
	return x * f; 
} 
void print(int x) { 
	if(x < 0) { 
		pc('-'); 
		x = -x; 
	} 
	if(x >= 10) print(x / 10); 
	pc(x % 10 + '0'); 
} 

int main() { 
	int n = read(); 
	int mn =  n + 1,mx = -1; 
	for(int q,i = 1;i <= n;++ i) mn = std::min(mn,a),mx = std::max(mx,a); 
	if(mx - mn > 1) { 
		puts("Yes"); 
	} else puts("No"); 
} 

Submission Info

Submission Time
Task B - Colorful Hats
User socialzzx
Language C++14 (GCC 5.4.1)
Score 0
Code Size 753 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:32:48: error: ‘a’ was not declared in this scope
  for(int q,i = 1;i <= n;++ i) mn = std::min(mn,a),mx = std::max(mx,a); 
                                                ^