mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-10 06:38:48 +00:00
P1738 洛谷的文件夹
R42014145
This commit is contained in:
parent
15bec61c23
commit
fa47505d1d
23
problem/P1738/P1738.cpp
Normal file
23
problem/P1738/P1738.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int n;
|
||||
set<string> disk;
|
||||
string s, dir;
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user