'commit'
This commit is contained in:
28
TangDou/XiTi/1291.cpp
Normal file
28
TangDou/XiTi/1291.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
//输入+输出重定向
|
||||
freopen("../1291.txt", "r", stdin);
|
||||
int m, n;
|
||||
cin >> m >> n;
|
||||
vector<int> a(m + 1, 0);
|
||||
vector<int> b(n + 1, 0);
|
||||
for (int i = 1; i <= m; i++) {
|
||||
cin >> a[i];
|
||||
}
|
||||
for (int i = 1; i <= n; i++) {
|
||||
cin >> b[i];
|
||||
}
|
||||
int count = 0;
|
||||
for (int i = 1; i <= m; i++) {
|
||||
for (int j = 1; j <= n; j++) {
|
||||
if (a[i] > b[j])count++;
|
||||
}
|
||||
}
|
||||
cout << count << endl;
|
||||
//关闭文件
|
||||
fclose(stdin);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user