diff options
author | Anthony Wang | 2021-06-02 16:50:01 -0500 |
---|---|---|
committer | Anthony Wang | 2021-06-02 16:50:01 -0500 |
commit | 8f6b101b6ee0257304e419c8dc818d477bc09667 (patch) | |
tree | ab3c58f6816d25366cb30f0cc6ef7e3e7ceb5074 | |
parent | c63ad0f7b9b1884797f444aae4adec051b12fe7f (diff) |
Update main.cpp to read from inptu
-rw-r--r-- | main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |