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

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:84:47: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'const char [2]')
   84 |                         cout << arr[23] - 0.5 < " ";
      |                         ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
      |                              |                  |
      |                              |                  const char [2]
      |                              std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from input/code.cpp:5:
/usr/include/c++/11/bits/regex.h:1077:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)'
 1077 |     operator<(const sub_match<_BiIter>& __lhs, const su...

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 ---- //
 
float b1 = 0.02623708478682374;
float k1[24] = {-0.02197703, 0.04341374, 0.00145373, 0.01315305 -0.05389639, 0.04299994,
				-0.02205997, 0.00549526, 0.0104706, -0.05514824, 0.06700865, 0.00835559,
				-0.04119852, 0.00315418, 0.03318097 -0.01621034 -0.03318527, 0.02477104,
				-0.02522914, 0.00697602 -0.00412755 -0.09377667, 0.05058915, 0.99879108};
 
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 (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 (arr[23] >= 5 && arr[23] < 10) {
			cout << arr[23] - 0.2 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.3 << " ";
			cout << arr[23] - 0.4 << " ";
			cout << arr[23] - 0.4 << " ";
			cout << arr[23] - 0.5 < " ";
			cout << arr[23] - 0.5 << " ";
			forn(gg, 4) cout << "? ";
			cout << "?" << endl;
			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 << " ";
		forn(gg, 5) cout << "? ";
		cout << "?" << endl;
	}
	
	return 0;
}