0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-27 08:12:00 +00:00
OI-codes/Luogu/P1738/P1738.cpp

24 lines
445 B
C++
Raw Normal View History

2020-11-16 11:39:45 +00:00
#include <bits/stdc++.h>
using namespace std;
int main() {
2021-11-19 09:01:13 +00:00
int n;
2020-11-16 11:39:45 +00:00
set<string> disk;
2021-11-19 09:01:13 +00:00
string s, dir;
2020-11-16 11:39:45 +00:00
cin >> n;
for (int i = 0; i < n; i++) {
cin >> s;
dir = "";
for (int j = 0; j < s.size(); j++) {
if (s[j] == '/') {
disk.insert(dir);
}
dir += s[j];
}
disk.insert(dir);
cout << disk.size() - 1 << endl;
}
return 0;
}