提交记录 15853


用户 题目 状态 得分 用时 内存 语言 代码长度
xuhaotu 1002i. 【模板题】多项式乘法 Time Limit Exceeded 0 1 s 1592 KB C++ 418 B
提交时间 评测时间
2021-02-18 21:25:30 2021-02-18 21:25:37
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int a[n+1],b[m+1],c[n+m+2]={0};
	for(int i=0;i<=n;i++){
		cin>>a[i];
	}
	for(int i=0;i<=m;i++){
		cin>>b[i];
	}
	for(int i=0;i<=n;i++){
		for(int j=0;j<=m;j++){
			c[i+j]+=a[i]*b[j];
		}
	}
	for(int i=0;i<=n+m;i++){
		if(c[i]!=0){
			cout<<c[i]<<" ";	
		}
	}
	return 0;
} 

CompilationN/AN/ACompile OKScore: N/A

Subtask #1 Testcase #135.71 us36 KBAcceptedScore: 0

Subtask #1 Testcase #21 s1 MB + 568 KBTime Limit ExceededScore: 0

Subtask #1 Testcase #315.46 ms1 MB + 68 KBWrong AnswerScore: 0

Subtask #1 Testcase #415.517 ms1 MB + 60 KBWrong AnswerScore: 0

Subtask #1 Testcase #536.53 us36 KBAcceptedScore: 0

Subtask #1 Testcase #635.91 us36 KBWrong AnswerScore: 0

Subtask #1 Testcase #735.74 us36 KBAcceptedScore: 0

Subtask #1 Testcase #81 s1 MB + 300 KBTime Limit ExceededScore: 0

Subtask #1 Testcase #91 s1 MB + 300 KBTime Limit ExceededScore: 0

Subtask #1 Testcase #101 s1 MB + 32 KBTime Limit ExceededScore: 0

Subtask #1 Testcase #111 s1 MB + 568 KBTime Limit ExceededScore: 0

Subtask #1 Testcase #121 s1 MB + 568 KBTime Limit ExceededScore: 0

Subtask #1 Testcase #1335.09 us36 KBAcceptedScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2021-03-03 16:49:12 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用