[programmers] Lv.3 추석 트래픽(c++)
다시 한번 풀기 더보기 #include using namespace std; pair time_difference(string s, int t){ long t_sec = 0; istringstream iss(s); string buff; int i = 2; while(getline(iss, buff, ':')){ buff.erase(remove(buff.begin(), buff.end(), '.'), buff.end()); t_sec += pow(60, i)*stoi(buff); if(i==1) t_sec *= 1000; i--; } return {t_sec - t + 1, t_sec}; } vector logs; int compute(long start, long end){ int cnt = 0, id..
2022. 4. 25.