Advent 2015 Day 7, 8 & 9 Parts 1 & 2
This commit is contained in:
parent
96b06c7bee
commit
de1a181ba5
40 changed files with 1158 additions and 0 deletions
|
|
@ -1,18 +0,0 @@
|
|||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
string buffer;
|
||||
|
||||
while(getline(cin, buffer))
|
||||
{
|
||||
int up = count(buffer.begin(), buffer.end(), '(');
|
||||
int down = count(buffer.begin(), buffer.end(), ')');
|
||||
|
||||
cout << "Floor: " << up - down << "\n";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue