Files
contests/advent_of_code/2022/3/main.cpp

38 lines
831 B
C++

#include <bits/stdc++.h>
using namespace std;
int main(){
ifstream input_file("input.txt");
string line;
unsigned int score = 0;
// while(getline(input_file, line)){
// set<char> items;
// auto l = line.length();
// for(int i = 0; i < l / 2; ++i){
// items.insert(line[i]);
// }
// for(int i = l / 2; i < l; ++i){
// if(items.find(line[i]) != items.end()){
// if(line[i] >= 'a' && line[i] <= 'z'){
// score += line[i] - 'a' + 1;
// } else{
// score += line[i] - 'A' + 1 + 26;
// }
// break;
// }
// }
// }
while(getline(input_file, line)){
}
cout << "Score: " << score << endl;
return 0;
}