Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main() {
	int m, n, red[500], blue[500], num[10];
	cin >> m >> n;


	for (int i = 0; i < m; i++) {
		//cout << "redcardテ・ツ?、テ」ツつ津・ツ?・テ・ツ環崚」ツ?療」ツ?ヲテ」ツ?湘」ツ??」ツ?陛」ツ?? << endl;
		cin >> red[i];
	}

	for (int i = 0; i < n; i++) {
		cout << "bluecardテ」ツ?ョテ・ツ?、テ」ツつ津・ツ?・テ・ツ環崚」ツ?療」ツ?ヲテ」ツ?湘」ツ??」ツ?陛」ツ?? << endl;
		cin >> blue[i];
	}

	int a;
	for (int j = 0; j < m; j++) {
		for (int i = 0; i < m; i++) {
			if (red[i] > red[i + 1]) {
				a = red[i];
				red[i] = red[i + 1];
				red[i + 1] = a;
			}
		}

	}

	for (int j = 0; j < n; j++) {
		for (int i = 0; i < n; i++) {
			if (blue[i] > blue[i + 1]) {
				a = blue[i];
				blue[i] = blue[i + 1];
				blue[i + 1] = a;
			}
		}

	}

	////////////////////テ」ツつステ」ツδシテ」ツδ暗・ツョツ古、ツコツ?

	int x=0, ans;
	for (int i = 0; i < m; i++) {
		for (int j = 0; j < n; j++) {
			if (red[i] == blue[j]) {
				blue[j] = 0;
				x++;
			}

			else {
				if (red[i] < blue[j]) {
					for (int k = i; k <= 100; k++) {
						ans = red[i] * k;
						if (ans == blue[j]) {
							blue[j] = 0;
							x++;
						}
					}
				}
				else if (red[i] > blue[j]) {
					for (int k = i; k <= 100; k++) {
						ans = blue[j] * k;
						if (ans == red[j]) {
							blue[j] = 0;
							x++;
						}
					}
				}

			}

		}
	}
	cout << x << endl;
	return 0;
}

Compiler output:
a.cc:17:25: warning: missing terminating " character
   17 |                 cout << "bluecardテ」ツ?ョテ・ツ?、テ」ツつ津・ツ?・テ・ツ環崚」ツ?療」ツ?ヲテ」ツ?湘」ツ??」ツ?陛」ツ?? << endl;
      |                         ^
a.cc:17:25: error: missing terminating " character
   17 |                 cout << "bluecardテ」ツ?ョテ・ツ?、テ」ツつ津・ツ?・テ・ツ環崚」ツ?療」ツ?ヲテ」ツ?湘」ツ??」ツ?陛」ツ?? << endl;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:17:22: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::istream' {aka 'std::basic_istream<char>'})
   17 |                 cout << "bluecardテ」ツ?ョテ・ツ?、テ」ツつ津・ツ?・テ・ツ環崚」ツ?療」ツ?ヲテ」ツ?湘」ツ??」ツ?陛」ツ?? << endl;
      |                 ~~~~ ^~
      |                 |
      |                 std::ostream {aka std::basic_ostream<char>}
   18 |                 cin >> blue[i];
      |                 ~~~   
      |                 |
      |                 std::istream {aka std::basic_istream<char>}
a.cc:17:22: note: candidate: 'operator<<(int, int)' (built-in)
   17 |                 cout << "bluecardテ」ツ?ョテ・ツ?、テ」ツつ津・ツ?・テ・ツ環崚」ツ?療」ツ?ヲテ」ツ?湘」ツ??」ツ?陛」ツ?? << endl;
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                 cin >> blue[i];
      |                 ~~~   
a.cc:17:22: note:   no known conversion for argument 2 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  116 |       operator<<(__ostream_type& (*__pf)(__ostream_type&))
      |       ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
  116 |       operator<<(__ostream_type& (*__pf)(__ostream_type&))
      |                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
  125 |       operator<<(__ios_type& (*__pf)(__ios_type&))
      |       ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
  125 |       operator<<(__ios_type& (*__pf)(__ios_type&))
      |                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  135 |       operator<<(ios_base& (*__pf) (ios_base&))
      |       ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
  135 |       operator<<(ios_base& (*__pf) (ios_base&))
      |                  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  174 |       operator<<(long __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long int'
  174 |       operator<<(long __n)
      |                  ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  178 |       operator<<(unsigned long __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long unsigned int'
  178 |       operator<<(unsigned long __n)
      |                  ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  182 |       operator<<(bool __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'bool'
  182 |       operator<<(bool __n)
      |                  ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
   96 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'short int'
   97 |     operator<<(short __n)
      |                ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  189 |       operator<<(unsigned short __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'short unsigned int'
  189 |       operator<<(unsigned short __n)
      |                  ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
  110 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
  111 |     operator<<(int __n)
      |                ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  200 |       operator<<(unsigned int __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'unsigned int'
  200 |       operator<<(unsigned int __n)
      |                  ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  211 |       operator<<(long long __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long long int'
  211 |       operator<<(long long __n)
      |                  ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  215 |       operator<<(unsigned long long __n)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long long unsigned int'
  215 |       operator<<(unsigned long long __n)
      |                  ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  231 |       operator<<(double __f)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'double'
  231 |       operator<<(double __f)
      |                  ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  235 |       operator<<(float __f)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'floa