Submission #104735


Source Code Expand

Copy
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <complex>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <functional>
#include <iterator>

using namespace std;

#define dump(n) cout<<"# "<<#n<<'='<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define foreach(i,c) for(auto i=(c).begin();i!=(c).end();++i)
#define all(c) begin(c),end(c)
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;
typedef pair<int,int> pii;

const int INFTY=1<<29;
const double EPS=1e-9;

template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p){
	return os<<'('<<p.first<<','<<p.second<<')';
}
template<typename T>
ostream& operator<<(ostream& os,const vector<T>& a){
	os<<'[';
	rep(i,a.size()) os<<(i?" ":"")<<a[i];
	return os<<']';
}

int main()
{
	function<bool(double,double)> fs[]={
		[](double mn,double mx){return 35-EPS<mx;},
		[](double mn,double mx){return 30-EPS<mx && mx+EPS<35;},
		[](double mn,double mx){return 25-EPS<mx && mx+EPS<30;},
		[](double mn,double mx){return 25-EPS<mn;},
		[](double mn,double mx){return mn+EPS<0 && 0-EPS<mx;},
		[](double mn,double mx){return mx+EPS<0;},
	};
	
	for(int n;cin>>n && n;){
		vi cnt(6);
		rep(i,n){
			double mn,mx; cin>>mx>>mn;
			rep(j,6)
				cnt[j]+=fs[j](mn,mx);
		}
		rep(i,6)
			cout<<(i?" ":"")<<cnt[i];
		cout<<endl;
	}
}

Submission Info

Submission Time
Task B - 真冬日?真夏日?
User lyoz
Language C++11 (GCC 4.8.1)
Score 100
Code Size 1987 Byte
Status AC
Exec Time 29 ms
Memory 920 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 17
Set Name Test Cases
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 20 ms 920 KB
00_sample_02.txt AC 24 ms 792 KB
00_sample_03.txt AC 22 ms 800 KB
test_00.txt AC 22 ms 796 KB
test_01.txt AC 21 ms 724 KB
test_02.txt AC 22 ms 796 KB
test_03.txt AC 22 ms 796 KB
test_04.txt AC 22 ms 796 KB
test_05.txt AC 21 ms 800 KB
test_06.txt AC 19 ms 792 KB
test_07.txt AC 21 ms 792 KB
test_08.txt AC 26 ms 808 KB
test_09.txt AC 27 ms 796 KB
test_10.txt AC 25 ms 912 KB
test_11.txt AC 29 ms 796 KB
test_12.txt AC 26 ms 812 KB
test_13.txt AC 26 ms 800 KB