Skip to content

Commit f4bffb8

Browse files
committed
Add silvers
1 parent c69b54a commit f4bffb8

1,108 files changed

Lines changed: 210462 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/c_cpp_properties.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceFolder}/**"
7+
],
8+
"defines": [],
9+
"macFrameworkPath": [
10+
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
11+
],
12+
"compilerPath": "/usr/bin/clang",
13+
"cStandard": "c17",
14+
"cppStandard": "c++17",
15+
"intelliSenseMode": "macos-clang-x64"
16+
}
17+
],
18+
"version": 4
19+
}

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "clang++ - Build and debug active file",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${fileDirname}/${fileBasenameNoExtension}",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${fileDirname}",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "lldb",
18+
"preLaunchTask": "C/C++: clang++ build active file"
19+
}
20+
]
21+
}

.vscode/settings.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"files.associations": {
3+
"iostream": "cpp",
4+
"iosfwd": "cpp",
5+
"stack": "cpp",
6+
"string": "cpp",
7+
"vector": "cpp",
8+
"__hash_table": "cpp",
9+
"__split_buffer": "cpp",
10+
"__tree": "cpp",
11+
"array": "cpp",
12+
"bitset": "cpp",
13+
"deque": "cpp",
14+
"initializer_list": "cpp",
15+
"iterator": "cpp",
16+
"queue": "cpp",
17+
"set": "cpp",
18+
"string_view": "cpp",
19+
"unordered_map": "cpp",
20+
"utility": "cpp",
21+
"tuple": "cpp"
22+
}
23+
}

.vscode/tasks.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"tasks": [
3+
{
4+
"type": "cppbuild",
5+
"label": "C/C++: clang++ build active file",
6+
"command": "/usr/bin/clang++",
7+
"args": [
8+
"-fdiagnostics-color=always",
9+
"-g",
10+
"${file}",
11+
"-o",
12+
"${fileDirname}/${fileBasenameNoExtension}",
13+
"-std=c++11"
14+
],
15+
"options": {
16+
"cwd": "${fileDirname}"
17+
},
18+
"problemMatcher": ["$gcc"],
19+
"group": {
20+
"kind": "build",
21+
"isDefault": true
22+
},
23+
"detail": "Task generated by Debugger."
24+
},
25+
{
26+
"type": "cppbuild",
27+
"label": "C/C++: g++ build active file",
28+
"command": "/usr/bin/g++",
29+
"args": [
30+
"-fdiagnostics-color=always",
31+
"-g",
32+
"${file}",
33+
"-o",
34+
"${fileDirname}/${fileBasenameNoExtension}",
35+
"-std=c++11"
36+
],
37+
"options": {
38+
"cwd": "${fileDirname}"
39+
},
40+
"problemMatcher": ["$gcc"],
41+
"group": "build",
42+
"detail": "compiler: /usr/bin/g++"
43+
},
44+
{
45+
"type": "cppbuild",
46+
"label": "C/C++: clang++ build active file",
47+
"command": "/usr/bin/clang++",
48+
"args": [
49+
"-fdiagnostics-color=always",
50+
"-g",
51+
"${file}",
52+
"-o",
53+
"${fileDirname}/${fileBasenameNoExtension}",
54+
"-std=c++11"
55+
],
56+
"options": {
57+
"cwd": "${fileDirname}"
58+
},
59+
"problemMatcher": ["$gcc"],
60+
"group": {
61+
"kind": "build",
62+
"isDefault": true
63+
},
64+
"detail": "Task generated by Debugger."
65+
}
66+
],
67+
"version": "2.0.0"
68+
}

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ project(algorithm)
33

44
set(CMAKE_CXX_STANDARD 17)
55

6-
add_executable(algorithm main.cpp)
6+
#add_executable(algorithm main.cpp boj/2947/main.cpp)
7+
add_executable(boj_2947_main boj/2947/main.cpp boj/2947/main.cpp boj/2947/main.h boj/2947/main.cpp)

boj/.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"files.associations": {
3+
"string": "cpp",
4+
"map": "cpp",
5+
"vector": "cpp",
6+
"__tuple": "cpp",
7+
"tuple": "cpp"
8+
}
9+
}

boj/.vscode/tasks.json

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "cppbuild",
6+
"label": "C/C++: clang build active file",
7+
"command": "/usr/bin/clang",
8+
"args": [
9+
"-fdiagnostics-color=always",
10+
"-g",
11+
"${file}",
12+
"-o",
13+
"${fileDirname}/${fileBasenameNoExtension}",
14+
"-std=c++14"
15+
],
16+
"options": {
17+
"cwd": "${fileDirname}"
18+
},
19+
"problemMatcher": ["$gcc"],
20+
"group": "build",
21+
"detail": "compiler: /usr/bin/clang"
22+
},
23+
{
24+
"type": "cppbuild",
25+
"label": "C/C++: clang build active file",
26+
"command": "/usr/bin/clang",
27+
"args": [
28+
"-fdiagnostics-color=always",
29+
"-g",
30+
"${file}",
31+
"-o",
32+
"${fileDirname}/${fileBasenameNoExtension}",
33+
"-std=c++14"
34+
],
35+
"options": {
36+
"cwd": "${fileDirname}"
37+
},
38+
"problemMatcher": ["$gcc"],
39+
"group": "build",
40+
"detail": "compiler: /usr/bin/clang"
41+
},
42+
{
43+
"type": "cppbuild",
44+
"label": "C/C++: clang build active file",
45+
"command": "/usr/bin/clang",
46+
"args": [
47+
"-fdiagnostics-color=always",
48+
"-g",
49+
"${file}",
50+
"-o",
51+
"${fileDirname}/${fileBasenameNoExtension}",
52+
"-std=c++14"
53+
],
54+
"options": {
55+
"cwd": "${fileDirname}"
56+
},
57+
"problemMatcher": ["$gcc"],
58+
"group": {
59+
"kind": "build",
60+
"isDefault": true
61+
},
62+
"detail": "compiler: /usr/bin/clang"
63+
},
64+
{
65+
"type": "cppbuild",
66+
"label": "C/C++: g++ build active file",
67+
"command": "/usr/bin/g++",
68+
"args": [
69+
"-fdiagnostics-color=always",
70+
"-g",
71+
"${file}",
72+
"-o",
73+
"${fileDirname}/${fileBasenameNoExtension}",
74+
"-std=c++14"
75+
],
76+
"options": {
77+
"cwd": "${fileDirname}"
78+
},
79+
"problemMatcher": ["$gcc"],
80+
"group": "build",
81+
"detail": "compiler: /usr/bin/g++"
82+
},
83+
{
84+
"type": "cppbuild",
85+
"label": "C/C++: cpp build active file",
86+
"command": "/usr/bin/cpp",
87+
"args": [
88+
"-fdiagnostics-color=always",
89+
"-g",
90+
"${file}",
91+
"-o",
92+
"${fileDirname}/${fileBasenameNoExtension}",
93+
"-std=c++14"
94+
],
95+
"options": {
96+
"cwd": "${fileDirname}"
97+
},
98+
"problemMatcher": ["$gcc"],
99+
"group": "build",
100+
"detail": "compiler: /usr/bin/cpp"
101+
}
102+
]
103+
}

boj/1343/main.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <iostream>
2+
#include <string>
3+
using namespace std;
4+
int main()
5+
{
6+
string s;
7+
cin >> s;
8+
9+
while (s.find("XXXX") != string::npos)
10+
s = s.replace(s.find("XXXX"), 4, "AAAA");
11+
while (s.find("XX") != string::npos)
12+
s = s.replace(s.find("XX"), 2, "BB");
13+
if (s.find("X") != string::npos)
14+
cout << -1;
15+
else
16+
cout << s;
17+
18+
return 0;
19+
}

boj/14916/main.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main()
5+
{
6+
int n;
7+
cin >> n;
8+
if (n == 1 || n == 3)
9+
{
10+
cout << -1;
11+
return 0;
12+
}
13+
int five = n / 5;
14+
n %= 5;
15+
while (n % 2 != 0)
16+
{
17+
n += 5;
18+
five--;
19+
}
20+
int two = n / 2;
21+
cout << five + two;
22+
23+
return 0;
24+
}

boj/15904/main.cpp

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#include <iostream>
2+
#include <string>
3+
4+
using namespace std;
5+
6+
int main()
7+
{
8+
string s;
9+
getline(cin, s);
10+
11+
int l = s.length();
12+
int i = 0;
13+
int check = 0;
14+
15+
while (i < l)
16+
{
17+
if (s[i] == 'U')
18+
{
19+
check++;
20+
break;
21+
}
22+
i++;
23+
}
24+
while (i < l)
25+
{
26+
if (s[i] == 'C')
27+
{
28+
check++;
29+
break;
30+
}
31+
i++;
32+
}
33+
while (i < l)
34+
{
35+
if (s[i] == 'P')
36+
{
37+
check++;
38+
break;
39+
}
40+
i++;
41+
}
42+
while (i < l)
43+
{
44+
if (s[i] == 'C')
45+
{
46+
check++;
47+
break;
48+
}
49+
i++;
50+
}
51+
if (check == 4)
52+
{
53+
cout << "I love UCPC";
54+
}
55+
else
56+
{
57+
cout << "I hate UCPC";
58+
}
59+
return 0;
60+
}

0 commit comments

Comments
 (0)