#include#includeint a[10];int cmp(const void *a,const void *b) {return *(int *)a-*(int *)b;}int main() { int n,m,i,t; scanf("%d",&t); while(t--) { sc...
转载 2014-05-07 22:57:00
43阅读
2评论
2011-12-16 07:00:16地址:http://acm.hdu.edu.cn/showproblem.php?pid=2139题意:算平方和的奇数项目。mark:1wa,没用long long。公式是(4*p*p*p+12*p*p+11*p+3)/3。其中2p+1 == n。代码:# include <stdio.h>int main (){ long long n, p ; while (~scanf ("%I64d", &n)) { p = (n-1) / 2 ; printf ("%I64d\n", (4*p*p*p+
转载 2012-01-06 17:20:00
19阅读
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2139
原创 2023-02-20 10:19:52
23阅读
读懂题意就简单了#include#define inf 999999999#define N 310int f[N];int map[N][N];int main() { int n,m,i,j,k,a,b,max,ans; while(scanf("%d%d",&n,&m)!=EOF)...
转载 2014-05-11 11:15:00
17阅读
2评论
Six Degrees of Cowvin Bacon Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5766 Accepted: 2712 Description The cows have been making movie
转载 2017-07-21 10:35:00
88阅读
Description The cows have been making movies lately, so they are ready to play a varian be zero ...
原创 2022-12-07 14:17:32
27阅读
题目大意:给你一个奇数N,求1~N中奇数的平方和。思路:直接暴力超时了,所以用公式来做 S = N*(N+1)*(N+2)/6,因为结果不超int型,但是中间过程会超一些,所以用__int64来做就可以了。注意cin、cout会超时,用scanf和printf就可以了。
原创 2015-01-29 22:13:09
27阅读
Six Degrees of Cowvin Bacon Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 2   Accepted Submission(s) : 1 Problem Description The cows have bee
原创 2021-08-31 10:29:10
63阅读
题目传送门 Six Degrees of Cowvin Bacon Time Limit: 1000MS Me
原创 2022-11-09 18:36:24
36阅读
Six Degrees of Cowvin Bacon Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other)   Problem Description The cows have been making movies lately, so they are ready to play
转载 2021-08-30 14:33:41
65阅读
Six Degrees of Cowvin BaconTime Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7024   Accepted: 3259 DescriptionThe cows have been making movies lately, so they are ready ...
原创 2023-03-02 06:41:51
112阅读
Spiderman’s workout My Tags (Edit) Source : Nordic Collegiate Programming Contest 2003 Time limit : 3 sec Memory limit : 32 M Submitted...
原创 2022-10-18 13:39:34
219阅读
1、const修饰的变量    const修饰的变量是不能通过变量再次赋值而改变。 1 int main{ 2 char buf[4]; 3 const int a = 0; //a不可改变 4 a = 10; //error 5 }  这个比较容易理解,编译器直接报错,原因在于“a = 10;”这句话,对const修饰的变量,后面进行
转载 2024-04-03 14:22:57
121阅读
错误 C2139 “QString”: 未定义的类不允许作为编译器内部类型特征“__is_convertible_to”的参数,错误 C2338 On MSVC you must pass the /permissive- option to the compiler.
原创 2024-08-01 16:20:06
534阅读
tion ‘sleep函数sl...
原创 2023-05-17 11:38:51
270阅读
C语言的结构和指针是C中的重点和精华,而指针错误大概是最常见的错误,指针
."c" not an argument in function sum 该标识符不是函数的参数2.array bounds missing ] in function main 缺少数组界限符 "]"3.Array size too large in function main 数组规模太大4.b
原创 2022-05-14 11:13:03
1435阅读
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt".原文:http://www.cnblogs.com/peace-lee/p/3586350.html昨天遇到一个比较奇怪的问题,
QT
转载 2016-12-30 16:23:14
962阅读
DescriptionThe cows have been making movies lately, so they are ready to play a variant of the famous game "Six Degrees of Kevin Bacon". The game works like this: each cow is considered to b
原创 2022-05-27 17:05:10
153阅读
1、error LNK2005:“已经在*.obj中定义” (1)   变量或者函数的定义放到cpp文件中,不要放到.h中。(2) #ifndef M
原创 2023-10-10 10:03:32
330阅读
  • 1
  • 2
  • 3
  • 4
  • 5