Submission #164285

# Submission time Handle Problem Language Result Execution time Memory
164285 2019-11-18T22:01:44 Z daddy0h 일차 함수 (tutorial4) C++11
Compilation error
0 ms 0 KB
/// https://oj.uz/problem/view/tutorial4
/// f(x) = ax + b;
/// -10^2 <= x <= 10^2
/// -10^5 <= a, b <= 10^5

#include <bits/stdc++.h>
#include "grader.h"

using namespace std;

#include "grader.h"

void solve() {

	int x1 = 0;
	int b = f(x1);
	int a;
	int x2 = 1;
	int a = f(x2) - b;
	
	Report(a, b);
}

Compilation message

tutorial4.cpp: In function 'void solve()':
tutorial4.cpp:19:6: error: redeclaration of 'int a'
  int a = f(x2) - b;
      ^
tutorial4.cpp:17:6: note: 'int a' previously declared here
  int a;
      ^