Submission #3248819


Source Code Expand

#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string.h>
using namespace std;
#define maxn 1e6;
int main()
{
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	if((b - a) == (c - b) || (c - b) == (b - a))
		printf("YES\n");
		else
			printf("NO\n");
			return 0;

}

Submission Info

Submission Time
Task A - ι⊥l
User vjudge4
Language C++14 (GCC 5.4.1)
Score 100
Code Size 277 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d %d", &a, &b, &c);
                               ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 12
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, A.txt, fever0.txt, fever7.txt, kure.txt, ma.txt, max.txt, nhk.txt, v.txt, xam.txt
Case Name Status Exec Time Memory
0_000.txt AC 1 ms 256 KB
0_001.txt AC 1 ms 256 KB
0_002.txt AC 1 ms 256 KB
A.txt AC 1 ms 256 KB
fever0.txt AC 1 ms 256 KB
fever7.txt AC 1 ms 256 KB
kure.txt AC 1 ms 256 KB
ma.txt AC 1 ms 256 KB
max.txt AC 1 ms 256 KB
nhk.txt AC 1 ms 256 KB
v.txt AC 1 ms 256 KB
xam.txt AC 1 ms 256 KB