summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2021-06-02 16:50:01 -0500
committerAnthony Wang2021-06-02 16:50:01 -0500
commit8f6b101b6ee0257304e419c8dc818d477bc09667 (patch)
treeab3c58f6816d25366cb30f0cc6ef7e3e7ceb5074
parentc63ad0f7b9b1884797f444aae4adec051b12fe7f (diff)
Update main.cpp to read from inptu
-rw-r--r--main.cpp7
1 files changed, 6 insertions, 1 deletions
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