0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 21:28:48 +00:00

2257. [Jsoi2009]瓶子和燃料

https://hydro.ac/d/bzoj/record/6344c90fe6f241d3af10f44d
This commit is contained in:
Baoshuo Ren 2022-10-11 10:00:49 +08:00
parent 7c0dfb9906
commit 082a2db95f
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
21 changed files with 98 additions and 0 deletions

38
BZOJ/2257/2257.cpp Normal file
View File

@ -0,0 +1,38 @@
#include <iostream>
#include <map>
using std::cin;
using std::cout;
const char endl = '\n';
int n, k;
std::map<int, int> map;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> k;
for (int i = 1, x; i <= n; i++) {
cin >> x;
for (int j = 1; j * j <= x; j++) {
if (x % j == 0) {
map[j]++;
if (j != x / j) map[x / j]++;
}
}
}
for (auto it = map.rbegin(); it != map.rend(); it++) {
if (it->second >= k) {
cout << it->first << endl;
exit(0);
}
}
return 0;
}

BIN
BZOJ/2257/data/1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/2257/data/9.out (Stored with Git LFS) Normal file

Binary file not shown.