Cod sursa(job #1033782)

Utilizator deividFlorentin Dumitru deivid Data 17 noiembrie 2013 15:22:57
Problema Dtcsu Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.63 kb
#include<stdio.h>
#include<bitset>

using namespace std;

FILE*f=fopen("dtcsu.in","r");
FILE*g=fopen("dtcsu.out","w");

int ch;
const int n = 276997;
char buff[23];
bitset<5000005>r;

int main () {
	
	long long x;
	for ( int i = 1 ; i <= n+1 ; ++i ){
		
		x = 0;
		fgets(buff,20,f);
		ch = 0;
		while ( buff[ch] >= '0' && buff[ch] <= '9' ){
			x = x*10 + buff[ch]-'0';
			++ch;
		}
	}
	
	int q = x;
	for ( int i = 1 ; i <= q ; ++i ){
		
		long long x = 0;
		fgets(buff,20,f);
		ch = 0;
		while ( buff[ch] >= '0' && buff[ch] <= '9' ){
			x = x*10 + buff[ch]-'0';
			++ch;
		}
	}
	
	fprintf(g,"%d\n",q/5);
	
	fclose(f);
	fclose(g);
	
	return 0;
}