问题描述
当我输入 #include <iostream>
#include <unordered_map>
#include <stdio.h>
#include <time.h>
using namespace std;
long int counts(const unordered_map<long int,long int> arr,long int L,long int R,long int val)
{
long int counter = 0;
for(auto it = arr.begin(); it != arr.end(); ++it) {
// cout << " " << it->first << ":" << it->second;
if(it->first <= val && it->first + R - L >= val) {
counter = counter + it->second;
// cout << " " << it->first << ":" << it->second;
}
}
return counter;
}
int main() {
clock_t tStart = clock();
long int N,M,A,B,L,R,counter = 0,key = 0,keyb = 0,sum = 0,a = 0,b = 0;
unordered_map<long int,long int> c;
unordered_map<long int,long int> d;
freopen("twingift50k.in","r",stdin);
scanf("%ld %ld %ld %ld",&N,&M,&L,&R);
for(long int i = 0; i < N; i++) {
scanf("%ld ",&A);
key = L - A;
if(A <= R) {
c[key]++;
}
key = 0;
}
for(long int j = 0; j < M; j++) {
scanf("%ld ",&B);
keyb = B;
if(B <= R) {
d[keyb]++;
}
keyb = 0;
}
for(auto it = d.begin(); it != d.end(); ++it) {
a = it->second;
b = counts(c,it->first);
sum = sum + a * b;
}
printf("%ld",sum);
printf("time taken: %.2fs",(double)(clock() - tStart) / CLOCKS_PER_SEC);
return 0;
}
glassfish 时出现错误:
start-domain
我已成功将我的 JRE 和 JDK 设置为 glassfish 所需的版本 8。 我尝试了网络上的所有答案,但没有奏效.. 有人知道我该怎么办吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)