Submission #71837114
Source Code Expand
//#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include <stdlib.h>
#include<string>
#include<math.h>
#include<sstream>
#include<set>
#include<math.h>
#include <algorithm>
#include<map>
#include <numeric>
#include <sstream>
#include <iomanip>
#include<tuple>
#include <bitset>
#include <queue>
#include <iomanip>
#include <stack>
#include<time.h>
#include <unordered_set>
#include <random>
using namespace::std;
#define RANDMAX 100000
#define ll long long
#define lint long long int
#define ldouble long double
#define ALL(a) (a).begin(),(a).end()
using ve = vector<lint>;
vector<vector<int>> map2;
//
using Gra = vector<vector<lint>>;
using sve = vector<string>;
//
//cout << std::fixed << std::setprecision(15)<< ans;//�����_
//
//
//<stack>//�ォ��
// box.push()
// box.pop()
// box.top()
//
// <queue>������
// box.push()
// box.front()
// box.pop()
//
// <set>
// ite=g2.lower_bound(r) set�T��
// distance(ls.begin(), ite);�T��������̈���
// advance() �͋ɗ͎g��Ȃ����ƁI�I�@***************************************
// g2.count() set()���̌�
// lower_bound(a.begin(),a.end(),a[i])
// box.size()
//
// <vector>
// vector<int>
// lower_bound(a.begin(),a.end(),a[i])
// vector<vector<lint>> v(2, vector<lint>(3)) -> v.at(1).at(2);
// next_permutation(aaa.begin(), aaa.end()) �x�N�^�[�̑g�ݍ��킹
//
//<2���T���@�`�蓮�����`>
// int binary_search(int key) {
// int left = 0, right = (int)a.size() - 1; // �z�� a �̍��[�ƉE�[
// while (right >= left) {
// int mid = left + (right - left) / 2; // ��Ԃ̐^��
// if (a[mid] == key) return mid;
// else if (a[mid] > key) right = mid - 1;
// else if (a[mid] < key) left = mid + 1;
// }
// return -1;
// }
//
// <bit�S�T��>
//�@bitset<60> bs(n);
//
//�{��swap����Ƃ��͔��̔ԍ���ς���
/* par=time_check(nh, nm);
nh = par.first; nm = par.second;*/
pair<lint, lint> time_check(int h, int m) {
while (m >= 60) {
h += 1;
m -= 60;
}
while (m < 0) {
h -= 1;
m += 60;
}
return make_pair(h, m);
}
std::random_device seed_gen;
uint32_t get_rand() {
// ����������i�����ɃV�[�h���w��\�j
static std::mt19937 mt32(seed_gen());
// [0, (2^32)-1] �̈�l���z������
return mt32();
}
class ansd {
public:
int p;
int x;
int y;
};
class zahyo {
public:
int x;
int y;
};
int main() {
lint h, w, n,ans=0,memo;
cin >> h >> w >> n;
vector<vector<lint>> a(h, vector<lint>(w));
ve box(n);
lint b;
for (lint i = 0; i < h; i++) {
for (lint j = 0; j < w; j++) {
cin >> a[i][j];
}
}
for (lint i = 0; i < n; i++) {
cin >> box[i];
}
for (lint i = 0; i < h; i++) {
memo = 0;
for (lint j = 0; j < w; j++) {
for (lint k = 0; k < n; k++) {
if (a[i][j] == box[k]) {
memo++;
}
}
}
ans = max(ans, memo);
}
cout << ans;
}
Submission Info
| Submission Time |
|
| Task |
B - Tombola |
| User |
tbbt95 |
| Language |
C++23 (GCC 15.2.0) |
| Score |
200 |
| Code Size |
3429 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3624 KiB |
Compile Error
./Main.cpp: In function 'int main()':
./Main.cpp:132:10: warning: unused variable 'b' [-Wunused-variable]
132 | lint b;
| ^
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
200 / 200 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt |
| All |
00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, 01-17.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00-sample-01.txt |
AC |
1 ms |
3576 KiB |
| 00-sample-02.txt |
AC |
1 ms |
3416 KiB |
| 00-sample-03.txt |
AC |
1 ms |
3424 KiB |
| 01-01.txt |
AC |
1 ms |
3576 KiB |
| 01-02.txt |
AC |
1 ms |
3556 KiB |
| 01-03.txt |
AC |
1 ms |
3624 KiB |
| 01-04.txt |
AC |
1 ms |
3460 KiB |
| 01-05.txt |
AC |
1 ms |
3556 KiB |
| 01-06.txt |
AC |
1 ms |
3556 KiB |
| 01-07.txt |
AC |
1 ms |
3612 KiB |
| 01-08.txt |
AC |
1 ms |
3596 KiB |
| 01-09.txt |
AC |
1 ms |
3600 KiB |
| 01-10.txt |
AC |
1 ms |
3624 KiB |
| 01-11.txt |
AC |
1 ms |
3596 KiB |
| 01-12.txt |
AC |
1 ms |
3524 KiB |
| 01-13.txt |
AC |
1 ms |
3596 KiB |
| 01-14.txt |
AC |
1 ms |
3588 KiB |
| 01-15.txt |
AC |
1 ms |
3596 KiB |
| 01-16.txt |
AC |
1 ms |
3480 KiB |
| 01-17.txt |
AC |
1 ms |
3576 KiB |