CSES - Datatähti 2024 alku - Results
Submission details
Task:Säähavainnot
Sender:Vludo
Submission time:2023-11-12 22:09:32 +0200
Language:C++ (C++11)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:42:46: error: 'a' was not declared in this scope
   42 |                         forn(gg, 11) cout << a[gg] << " ";
      |                                              ^

Code

/*
    C++ code author: Vludo
    Created: 2023-11-08 07:54:29
*/
#include <bits/stdc++.h>
 
#define forn(i, n) for(int i=0; i<n; i++)
#define FOR(i, j, n) for(int i=j; i<n; i++)
#define pb push_back
#define F first
#define S second
#define ever ;;
 
typedef long long ll;
 
const int inf = 1.01e9;
const int mod = 1e9 + 7;
 
using namespace std;
 
// ---- main part ---- //
 
static inline unsigned long long rdtsc() { unsigned long long d; asm volatile ("rdtsc" : "=A" (d) ); return d; }
 
 
int main () {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	srand(rdtsc());
	
	int n;
	cin >> n;
	
	forn(i, n) {
		float arr[36];
		
		forn(j, 24) {
			cin >> arr[j];
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 30) {
			forn(gg, 11) cout << a[gg] << " ";
			cout << "?" << endl;
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 25) {
			// cout << arr[23] + 0.1 << " ";
			forn(gg, 11) cout << "? ";
			cout << "?" << endl;
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 20) {
			cout << arr[23] + 0.1 << " ";
			forn(gg, 10) cout << "? ";
			cout << "?" << endl;
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 15) {
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			forn(gg, 8) cout << "? ";
			cout << "?" << endl;
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 7) {
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.3 << " ";
			forn(gg, 6) cout << "? ";
			cout << "?" << endl;
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 5) {
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.4 << " ";
			forn(gg, 5) cout << "? ";
			cout << "?" << endl;
			continue;
		}
		
		if (arr[23] <= 1.8 && arr[23] >= -1.8) {
			cout << arr[23] - 0.07 << " ";
			cout << arr[23] - 0.1 << " ";
			cout << arr[23] - 0.1 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.4 << " ";
			cout << arr[23] - 0.4 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.1 << " ";
			cout << arr[23] - 0.1 << " ";
			cout << arr[23] - 0.07 << endl;
			continue;
		}
		
		if (arr[23] > 1.8 && arr[23] < 5) {
			cout << arr[23] - 0 << " ";
			cout << arr[23] - 0 << " ";
			cout << arr[23] - 0 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.5 << " ";
			cout << arr[23] - 0.5 << " ";
			forn(gg, 3) cout << "? ";
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) > 3) {
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] + 0.1 << " ";
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.85 << " ";
			cout << arr[23] - 0.85 << " ";
			forn(gg, 5) cout << "? ";
			continue;
		}
		
		if (*max_element(arr, arr+24) - *min_element(arr, arr+24) < 1.5) {
			cout << arr[23] + 0.1 << " ";
			cout << arr[0] + 0. << " ";
			cout << arr[1] - 0. << " ";
			cout << arr[2] - 0. << " ";
			cout << arr[3] - 0. << " ";
			cout << arr[4] - 0. << " ";
			cout << arr[5] - 0. << " ";
			cout << arr[6] - 0. << " ";
			cout << arr[7] + 0. << " ";
			cout << arr[8] + 0. << " ";
			cout << arr[9] + 0. << " ";
			cout << arr[10] + 0. << " ";
			continue;
		}
		
		cout << arr[23] + 0.1 << " ";
		cout << arr[23] + 0.1 << " ";
		cout << arr[23] + 0.1 << " ";
		cout << arr[23] - 0.2 << " ";
		cout << arr[23] - 0.3 << " ";
		cout << arr[23] - 0.85 << " ";
		cout << arr[23] - 0.85 << " ";
		cout << arr[23] - 0.85 << " ";
		cout << arr[23] - 0.85 << " ";
		cout << "?" << endl;
		cout << "?" << endl;
		cout << "?" << endl;
	}
	
	return 0;
}