commit 75f441a6548a71eb96bec684fe757717c73a4531
parent 10e0bae37f65e07256d0a7f52d8f968fff363f6a
Author: Jachiet Louis <louis@jachiet.com>
Date: Sat, 5 Apr 2014 12:24:24 +0200
Ajout du 8 en tĂȘte
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/contest/louis/main.cc b/contest/louis/main.cc
@@ -2,6 +2,7 @@
#include <algorithm>
#include <future>
#include <vector>
+#include "solution.h"
using namespace std;
diff --git a/contest/louis/solution.h b/contest/louis/solution.h
@@ -5,9 +5,10 @@ class solution
void readFile(const char * s)
{
FILE * f = fopen(s,"r");
+ int s ;
+ fscanf(f,"%d",&s);
for(int v = 0 ; v < nbVoitures ; v++)
{
- int s ;
fscanf(f,"%d",&s);
while(s--)
{
@@ -21,6 +22,7 @@ class solution
void writeFile(const char * s)
{
FILE * f = fopen(s,"w");
+ fprintf(f,"8\n");
for(int v = 0 ; v < nbVoitures ; v++)
{
fprintf(f,"%d\n",cibles[v].size());