From 8f6b101b6ee0257304e419c8dc818d477bc09667 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Wed, 2 Jun 2021 16:50:01 -0500 Subject: Update main.cpp to read from inptu --- main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 6fbe40a..b52f6c2 100644 --- a/main.cpp +++ b/main.cpp @@ -151,7 +151,7 @@ string types[7] = {"original", void answer(){ for(int i = 0; i < 100;i++){ string inp; cin >> inp; - cout << types[solve(inp)]; + cout << types[solve(inp)] << '\n'; } @@ -163,6 +163,11 @@ void answer(){ int main(){ ios::sync_with_stdio(0); cin.tie(0); + if (fopen("input.txt", "r")) { + freopen("input.txt", "r", stdin); + answer(); + return 0; + } if (fopen("spike_sequences.txt", "r")) { freopen("spike_sequences.txt", "r", stdin); for (int i = 0; i < 7; ++i) { // 7 vrts -- cgit v1.2.3-70-g09d2