20250819 baekjoon
This commit is contained in:
parent
913341174e
commit
371e636d4c
5
code_study/Baekjoon/python/10815.py
Normal file
5
code_study/Baekjoon/python/10815.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from collections import Counter
|
||||||
|
input()
|
||||||
|
counter = Counter(input().split())
|
||||||
|
input()
|
||||||
|
print(' '.join(str(counter[n]) for n in input().split()))
|
||||||
5
code_study/Baekjoon/ts/10815.ts
Normal file
5
code_study/Baekjoon/ts/10815.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export {};
|
||||||
|
const input:string[] = require("fs").readFileSync(0,"utf8").toString().trim().split('\n');
|
||||||
|
let counter:Map<number, number> = new Map<number, number>();
|
||||||
|
for(let n of input[1].split(' ').map(Number)) counter.set(n,1);
|
||||||
|
console.log(input[3].split(' ').map(Number).map((n=> counter.get(n) || 0)).join(' '));
|
||||||
2
code_study/Baekjoon/ts/1427.ts
Normal file
2
code_study/Baekjoon/ts/1427.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export {};
|
||||||
|
console.log(require("fs").readFileSync(0,"utf8").toString().trim().split('').sort((a:string,b:string)=>b.charCodeAt(0)-a.charCodeAt(0)).join(''));
|
||||||
4
code_study/Baekjoon/ts/25305.ts
Normal file
4
code_study/Baekjoon/ts/25305.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export {};
|
||||||
|
const input:string[] = require("fs").readFileSync(0,"utf8").toString().trim().split('\n');
|
||||||
|
const [N,k]: number[] = input[0].split(" ").map(Number);
|
||||||
|
console.log(input[1].split(' ').map(Number).sort((a,b)=>b-a)[k-1]);
|
||||||
Loading…
x
Reference in New Issue
Block a user