From 8a06a8c94f843e19c1e1729faede6c5f34178ba9 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Thu, 10 May 2018 21:20:32 -0400 Subject: stuck on newspaper --- 11340/newspaper.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/11340/newspaper.cpp b/11340/newspaper.cpp index 9ffa848..50f8d85 100644 --- a/11340/newspaper.cpp +++ b/11340/newspaper.cpp @@ -1,5 +1,6 @@ #include #include +#include #include using namespace std; @@ -9,20 +10,21 @@ int main(){ for(int i=0; i>k; for(int j=0; j>c>>cost; - costmap[c+128] = cost; + scanf("%hhu", &c); + scanf("%i", &cost); + costmap[c] = cost; } - cin>>lines; + lines=cin.get(); cin.ignore(); for(int j=0; j