From b9dfd2442518bdb9060329fcf9c73812d1965f0e Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Fri, 11 May 2018 11:22:25 -0400 Subject: working on buddies optimization --- 11340/newspaper.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to '11340') diff --git a/11340/newspaper.cpp b/11340/newspaper.cpp index 50f8d85..f5043cf 100644 --- a/11340/newspaper.cpp +++ b/11340/newspaper.cpp @@ -1,30 +1,26 @@ #include #include -#include -#include using namespace std; int main(){ int tc; cin>>tc; - for(int i=0; i>k; - for(int j=0; j>s>>cost; + costmap[int(s[0])+128]=cost; } - lines=cin.get(); + cin>>lines; cin.ignore(); - for(int j=0; j