Solution for CCC '08 S1 - It's Cold Here! in C++


Feb. 18, 2020 0.070611 seconds C++
#include <iostream>
#include <math.h>
#include <bits/stdc++.h>

using namespace std;

template<class C>constexpr int sz(const C&c){return int(c.size());}

using ll=long long;constexpr const char nl='\n',sp=' ';

  int main(){
      ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
		int t, large = 0;
		string temp, store;
		for(int i = 0; i < 10000; i++){
			cin >> temp;
			cin >> t;
			if(t <= large){
				large = t;
				store = temp;
			}
			if(temp == "Waterloo"){
				break;
			}
			
		}
		cout << store;
      return 0;
  }

Editorial


No editorial for this problem. :(

Original Problem


You can view the original page for this problem on the DMOJ.