Cod sursa(job #1033767)

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

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

int ch;
const int n = 276997;
long long A[n+5];
char buff[23];

int main () {
	
	for ( int i = 1 ; i <= n+1 ; ++i ){
		
		fgets(buff,20,f);
		ch = 0;
		while ( buff[ch] >= '0' && buff[ch] <= '9' ){
			A[i] = A[i]*10 + buff[ch]-'0';
			++ch;
		}
	}
	
	int q = A[n+1];
	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",0);
	
	fclose(f);
	fclose(g);
	
	return 0;
}