Skip to content

Commit

Permalink
feat: 2023/12/26
Browse files Browse the repository at this point in the history
  • Loading branch information
kweonminsung committed Dec 25, 2023
1 parent 1208563 commit 3e4759a
Show file tree
Hide file tree
Showing 11 changed files with 216 additions and 35 deletions.
25 changes: 25 additions & 0 deletions 10816/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n;
cin >> n;
map<int, int> j;
for (int i = 0; i < n; i++) {
int input;
cin >> input;
j[input]++;
}

int m;
cin >> m;
while (m--) {
int input;
cin >> input;
cout << j[input] << " ";
}
}
24 changes: 24 additions & 0 deletions 10989/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n;
cin >> n;
map<int, int> m;
int maxN = 0;
for (int i = 0; i < n; i++) {
int input;
cin >> input;
m[input]++;
maxN = max(input, maxN);
}

for (int i = 1; i <= maxN; i++) {
for (int j = 0; j < m[i]; j++)
cout << i << "\n";
}
}
20 changes: 20 additions & 0 deletions 11478/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

string str;
cin >> str;
set<string> s;

for (int i = 1; i <= str.size(); i++) {
for (int j = 0; j < str.size() - i + 1; j++) {
s.insert(str.substr(j, i));
}
}

cout << s.size();
}
20 changes: 20 additions & 0 deletions 1269/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n, m;
cin >> n >> m;
set<int> s;

for (int i = 0; i < n + m; i++) {
int input;
cin >> input;
s.insert(input);
}

cout << 2 * s.size() - m - n;
}
31 changes: 31 additions & 0 deletions 1764/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n, m, cnt = 0;
cin >> n >> m;
map<string, int> j;
for (int i = 0; i < n; i++) {
string input;
cin >> input;
j[input] = 1;
}

set<string> s;
while (m--) {
string input;
cin >> input;
if (j[input] == 1) {
s.insert(input);
cnt++;
}
}

cout << cnt << "\n";
for (auto i : s)
cout << i << "\n";
}
21 changes: 21 additions & 0 deletions 25305/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n, k;
cin >> n >> k;
vector<int> v;
for (int i = 0; i < n; i++) {
int input;
cin >> input;
v.push_back(input);
}

sort(v.rbegin(), v.rend());

cout << v[k - 1];
}
21 changes: 21 additions & 0 deletions 2587/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int tot = 0;
vector<int> v;

for (int i = 0; i < 5; i++) {
int input;
cin >> input;
tot += input;
v.push_back(input);
}
sort(v.begin(), v.end());

cout << tot / 5 << "\n" << v[2];
}
21 changes: 21 additions & 0 deletions 2750/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n;
cin >> n;
set<int> s;

while (n--) {
int input;
cin >> input;
s.insert(input);
}

for (auto i : s)
cout << i << "\n";
}
21 changes: 21 additions & 0 deletions 2751/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <bits/stdc++.h>

using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);

int n;
cin >> n;
set<int> s;

for (int i = 0; i < n; i++) {
int input;
cin >> input;
s.insert(input);
}

for (auto i : s)
cout << i << "\n";
}
41 changes: 10 additions & 31 deletions input.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
26 5
Bulbasaur
Ivysaur
Venusaur
Charmander
Charmeleon
Charizard
Squirtle
Wartortle
Blastoise
Caterpie
Metapod
Butterfree
Weedle
Kakuna
Beedrill
Pidgey
Pidgeotto
Pidgeot
Rattata
Raticate
Spearow
Fearow
Ekans
Arbok
Pikachu
Raichu
25
Raichu
10
5
2
3
Pidgey
Kakuna
1
4
2
3
5
1
7
6 changes: 2 additions & 4 deletions template/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using namespace std;

int main() {
ios::sync_with_stdio(0);
cin.tie(0);


ios::sync_with_stdio(0);
cin.tie(0);
}

0 comments on commit 3e4759a

Please sign in to comment.