补充样例

This commit is contained in:
wangfiox 2024-08-10 14:32:48 +08:00
parent 2e37cdeeab
commit 8114ffaf1f
61 changed files with 4660 additions and 78 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ build
**/asm
**/log
**/output
**/diff
!**/expect/output
**/*.toml
zci.toml

View File

@ -0,0 +1,3 @@
10995
0

View File

@ -0,0 +1,3 @@
49260
0

View File

@ -0,0 +1,3 @@
60255
0

View File

@ -0,0 +1,3 @@
10
0

View File

@ -0,0 +1,3 @@
10
0

View File

@ -0,0 +1,3 @@
10
0

View File

@ -0,0 +1,3 @@
341954021
0

View File

@ -0,0 +1,3 @@
342613469
0

View File

@ -0,0 +1,3 @@
340506323
0

View File

@ -0,0 +1,3 @@
p
0

View File

@ -0,0 +1,3 @@
p
0

View File

@ -0,0 +1,3 @@
p
0

View File

@ -0,0 +1 @@
20000000

View File

@ -0,0 +1 @@
30000000

View File

@ -0,0 +1 @@
50000000

View File

@ -0,0 +1 @@
2048

View File

@ -0,0 +1 @@
4096

View File

@ -0,0 +1 @@
8192

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
29

View File

@ -0,0 +1 @@
27

View File

@ -0,0 +1 @@
28

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define N 1024
const int N = 1024;
void mm(int n, int A[][N], int B[][N], int C[][N]){
int i, j, k;
@ -87,4 +86,5 @@ int main(){
putch(10);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define N 1024
const int N = 1024;
void mm(int n, int A[][N], int B[][N], int C[][N]){
int i, j, k;
@ -87,4 +86,5 @@ int main(){
putch(10);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define N 1024
const int N = 1024;
void mm(int n, int A[][N], int B[][N], int C[][N]){
int i, j, k;
@ -87,4 +86,5 @@ int main(){
putch(10);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define base 16
const int base = 16;
int getMaxNum(int n, int arr[]){
int ret = 0;
@ -104,4 +103,5 @@ int main(){
putint(ans);
putch(10);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define base 16
const int base = 16;
int getMaxNum(int n, int arr[]){
int ret = 0;
@ -104,4 +103,5 @@ int main(){
putint(ans);
putch(10);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define base 16
const int base = 16;
int getMaxNum(int n, int arr[]){
int ret = 0;
@ -104,4 +103,5 @@ int main(){
putint(ans);
putch(10);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
void spmv(int n,int xptr[], int yidx[], int vals[], int b[], int x[]){
int i, j, k;
i = 0;
@ -24,8 +23,8 @@ void spmv(int n,int xptr[], int yidx[], int vals[], int b[], int x[]){
}
}
#define N 100010
#define M 3000000
const int N = 100010;
const int M = 3000000;
int x[N], y[M], v[M];
int a[N], b[N], c[N];
@ -48,4 +47,5 @@ int main(){
stoptime();
putarray(n, b);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
void spmv(int n,int xptr[], int yidx[], int vals[], int b[], int x[]){
int i, j, k;
i = 0;
@ -24,8 +23,8 @@ void spmv(int n,int xptr[], int yidx[], int vals[], int b[], int x[]){
}
}
#define N 100010
#define M 3000000
const int N = 100010;
const int M = 3000000;
int x[N], y[M], v[M];
int a[N], b[N], c[N];
@ -48,4 +47,5 @@ int main(){
stoptime();
putarray(n, b);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
void spmv(int n,int xptr[], int yidx[], int vals[], int b[], int x[]){
int i, j, k;
i = 0;
@ -24,8 +23,8 @@ void spmv(int n,int xptr[], int yidx[], int vals[], int b[], int x[]){
}
}
#define N 100010
#define M 3000000
const int N = 100010;
const int M = 3000000;
int x[N], y[M], v[M];
int a[N], b[N], c[N];
@ -48,4 +47,5 @@ int main(){
stoptime();
putarray(n, b);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define mod 998244353
const int mod = 998244353;
int d;
int multiply(int a, int b){
@ -18,7 +17,7 @@ int power(int a, int b){
if (b % 2 == 1) return multiply(cur, a);
else return cur;
}
#define maxlen 2097152
const int maxlen = 2097152;
int temp[maxlen], a[maxlen], b[maxlen], c[maxlen];
int memmove(int dst[], int dst_pos, int src[], int len){
@ -80,4 +79,5 @@ int main(){
stoptime();
putarray(n + m - 1, a);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define mod 998244353
const int mod = 998244353;
int d;
int multiply(int a, int b){
@ -18,7 +17,7 @@ int power(int a, int b){
if (b % 2 == 1) return multiply(cur, a);
else return cur;
}
#define maxlen 2097152
const int maxlen = 2097152;
int temp[maxlen], a[maxlen], b[maxlen], c[maxlen];
int memmove(int dst[], int dst_pos, int src[], int len){
@ -80,4 +79,5 @@ int main(){
stoptime();
putarray(n + m - 1, a);
return 0;
}

View File

@ -1,5 +1,4 @@
#include "sylib.h"
#define mod 998244353
const int mod = 998244353;
int d;
int multiply(int a, int b){
@ -18,7 +17,7 @@ int power(int a, int b){
if (b % 2 == 1) return multiply(cur, a);
else return cur;
}
#define maxlen 2097152
const int maxlen = 2097152;
int temp[maxlen], a[maxlen], b[maxlen], c[maxlen];
int memmove(int dst[], int dst_pos, int src[], int len){
@ -80,4 +79,5 @@ int main(){
stoptime();
putarray(n + m - 1, a);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int sheet1[500][500] = {};
int sheet2[500][500] = {};
int active = 1;
@ -110,4 +109,5 @@ int main() {
}
put_map();
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int sheet1[500][500] = {};
int sheet2[500][500] = {};
int active = 1;
@ -110,4 +109,5 @@ int main() {
}
put_map();
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int sheet1[500][500] = {};
int sheet2[500][500] = {};
int active = 1;
@ -110,4 +109,5 @@ int main() {
}
put_map();
return 0;
}

View File

@ -0,0 +1,331 @@
int func(int n) {
int sum = 0;
int i = 200;
int j = 0;
int s[100];
int m = 0;
while (m < 100){
s[m] = 0;
m=m+1;
}
while(j < n) {
if (i > 1){
s[1] = 1;
if (i > 2){
s[2] = 2;
if (i > 3){
s[3] = 3;
if (i > 4){
s[4] = 4;
if (i > 5){
s[5] = 5;
if (i > 6){
s[6] = 6;
if (i > 7){
s[7] = 7;
if (i > 8){
s[8] = 8;
if (i > 9){
s[9] = 9;
if (i > 10){
s[10] = 10;
if (i > 11){
s[11] = 11;
if (i > 12){
s[12] = 12;
if (i > 13){
s[13] = 13;
if (i > 14){
s[14] = 14;
if (i > 15){
s[15] = 15;
if (i > 16){
s[16] = 16;
if (i > 17){
s[17] = 17;
if (i > 18){
s[18] = 18;
if (i > 19){
s[19] = 19;
if (i > 20){
s[20] = 20;
if (i > 21){
s[21] = 21;
if (i > 22){
s[22] = 22;
if (i > 23){
s[23] = 23;
if (i > 24){
s[24] = 24;
if (i > 25){
s[25] = 25;
if (i > 26){
s[26] = 26;
if (i > 27){
s[27] = 27;
if (i > 28){
s[28] = 28;
if (i > 29){
s[29] = 29;
if (i > 30){
s[30] = 30;
if (i > 31){
s[31] = 31;
if (i > 32){
s[32] = 32;
if (i > 33){
s[33] = 33;
if (i > 34){
s[34] = 34;
if (i > 35){
s[35] = 35;
if (i > 36){
s[36] = 36;
if (i > 37){
s[37] = 37;
if (i > 38){
s[38] = 38;
if (i > 39){
s[39] = 39;
if (i > 40){
s[40] = 40;
if (i > 41){
s[41] = 41;
if (i > 42){
s[42] = 42;
if (i > 43){
s[43] = 43;
if (i > 44){
s[44] = 44;
if (i > 45){
s[45] = 45;
if (i > 46){
s[46] = 46;
if (i > 47){
s[47] = 47;
if (i > 48){
s[48] = 48;
if (i > 49){
s[49] = 49;
if (i > 50){
s[50] = 50;
if (i > 51){
s[51] = 51;
if (i > 52){
s[52] = 52;
if (i > 53){
s[53] = 53;
if (i > 54){
s[54] = 54;
if (i > 55){
s[55] = 55;
if (i > 56){
s[56] = 56;
if (i > 57){
s[57] = 57;
if (i > 58){
s[58] = 58;
if (i > 59){
s[59] = 59;
if (i > 60){
s[60] = 60;
if (i > 61){
s[61] = 61;
if (i > 62){
s[62] = 62;
if (i > 63){
s[63] = 63;
if (i > 64){
s[64] = 64;
if (i > 65){
s[65] = 65;
if (i > 66){
s[66] = 66;
if (i > 67){
s[67] = 67;
if (i > 68){
s[68] = 68;
if (i > 69){
s[69] = 69;
if (i > 70){
s[70] = 70;
if (i > 71){
s[71] = 71;
if (i > 72){
s[72] = 72;
if (i > 73){
s[73] = 73;
if (i > 74){
s[74] = 74;
if (i > 75){
s[75] = 75;
if (i > 76){
s[76] = 76;
if (i > 77){
s[77] = 77;
if (i > 78){
s[78] = 78;
if (i > 79){
s[79] = 79;
if (i > 80){
s[80] = 80;
if (i > 81){
s[81] = 81;
if (i > 82){
s[82] = 82;
if (i > 83){
s[83] = 83;
if (i > 84){
s[84] = 84;
if (i > 85){
s[85] = 85;
if (i > 86){
s[86] = 86;
if (i > 87){
s[87] = 87;
if (i > 88){
s[88] = 88;
if (i > 89){
s[89] = 89;
if (i > 90){
s[90] = 90;
if (i > 91){
s[91] = 91;
if (i > 92){
s[92] = 92;
if (i > 93){
s[93] = 93;
if (i > 94){
s[94] = 94;
if (i > 95){
s[95] = 95;
if (i > 96){
s[96] = 96;
if (i > 97){
s[97] = 97;
if (i > 98){
s[98] = 98;
if (i > 99){
s[99] = 99;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
j=j+1;
int m = 0;
while (m < 100){
sum = sum + s[m];
m=m+1;
}
sum = sum % 65535;
}
return sum;
}
int main() {
starttime();
int loopcount = getint();
putint(func(loopcount));
putch(10);
stoptime();
return 0;
}

View File

@ -0,0 +1,331 @@
int func(int n) {
int sum = 0;
int i = 200;
int j = 0;
int s[100];
int m = 0;
while (m < 100){
s[m] = 0;
m=m+1;
}
while(j < n) {
if (i > 1){
s[1] = 1;
if (i > 2){
s[2] = 2;
if (i > 3){
s[3] = 3;
if (i > 4){
s[4] = 4;
if (i > 5){
s[5] = 5;
if (i > 6){
s[6] = 6;
if (i > 7){
s[7] = 7;
if (i > 8){
s[8] = 8;
if (i > 9){
s[9] = 9;
if (i > 10){
s[10] = 10;
if (i > 11){
s[11] = 11;
if (i > 12){
s[12] = 12;
if (i > 13){
s[13] = 13;
if (i > 14){
s[14] = 14;
if (i > 15){
s[15] = 15;
if (i > 16){
s[16] = 16;
if (i > 17){
s[17] = 17;
if (i > 18){
s[18] = 18;
if (i > 19){
s[19] = 19;
if (i > 20){
s[20] = 20;
if (i > 21){
s[21] = 21;
if (i > 22){
s[22] = 22;
if (i > 23){
s[23] = 23;
if (i > 24){
s[24] = 24;
if (i > 25){
s[25] = 25;
if (i > 26){
s[26] = 26;
if (i > 27){
s[27] = 27;
if (i > 28){
s[28] = 28;
if (i > 29){
s[29] = 29;
if (i > 30){
s[30] = 30;
if (i > 31){
s[31] = 31;
if (i > 32){
s[32] = 32;
if (i > 33){
s[33] = 33;
if (i > 34){
s[34] = 34;
if (i > 35){
s[35] = 35;
if (i > 36){
s[36] = 36;
if (i > 37){
s[37] = 37;
if (i > 38){
s[38] = 38;
if (i > 39){
s[39] = 39;
if (i > 40){
s[40] = 40;
if (i > 41){
s[41] = 41;
if (i > 42){
s[42] = 42;
if (i > 43){
s[43] = 43;
if (i > 44){
s[44] = 44;
if (i > 45){
s[45] = 45;
if (i > 46){
s[46] = 46;
if (i > 47){
s[47] = 47;
if (i > 48){
s[48] = 48;
if (i > 49){
s[49] = 49;
if (i > 50){
s[50] = 50;
if (i > 51){
s[51] = 51;
if (i > 52){
s[52] = 52;
if (i > 53){
s[53] = 53;
if (i > 54){
s[54] = 54;
if (i > 55){
s[55] = 55;
if (i > 56){
s[56] = 56;
if (i > 57){
s[57] = 57;
if (i > 58){
s[58] = 58;
if (i > 59){
s[59] = 59;
if (i > 60){
s[60] = 60;
if (i > 61){
s[61] = 61;
if (i > 62){
s[62] = 62;
if (i > 63){
s[63] = 63;
if (i > 64){
s[64] = 64;
if (i > 65){
s[65] = 65;
if (i > 66){
s[66] = 66;
if (i > 67){
s[67] = 67;
if (i > 68){
s[68] = 68;
if (i > 69){
s[69] = 69;
if (i > 70){
s[70] = 70;
if (i > 71){
s[71] = 71;
if (i > 72){
s[72] = 72;
if (i > 73){
s[73] = 73;
if (i > 74){
s[74] = 74;
if (i > 75){
s[75] = 75;
if (i > 76){
s[76] = 76;
if (i > 77){
s[77] = 77;
if (i > 78){
s[78] = 78;
if (i > 79){
s[79] = 79;
if (i > 80){
s[80] = 80;
if (i > 81){
s[81] = 81;
if (i > 82){
s[82] = 82;
if (i > 83){
s[83] = 83;
if (i > 84){
s[84] = 84;
if (i > 85){
s[85] = 85;
if (i > 86){
s[86] = 86;
if (i > 87){
s[87] = 87;
if (i > 88){
s[88] = 88;
if (i > 89){
s[89] = 89;
if (i > 90){
s[90] = 90;
if (i > 91){
s[91] = 91;
if (i > 92){
s[92] = 92;
if (i > 93){
s[93] = 93;
if (i > 94){
s[94] = 94;
if (i > 95){
s[95] = 95;
if (i > 96){
s[96] = 96;
if (i > 97){
s[97] = 97;
if (i > 98){
s[98] = 98;
if (i > 99){
s[99] = 99;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
j=j+1;
int m = 0;
while (m < 100){
sum = sum + s[m];
m=m+1;
}
sum = sum % 65535;
}
return sum;
}
int main() {
starttime();
int loopcount = getint();
putint(func(loopcount));
putch(10);
stoptime();
return 0;
}

View File

@ -0,0 +1,331 @@
int func(int n) {
int sum = 0;
int i = 200;
int j = 0;
int s[100];
int m = 0;
while (m < 100){
s[m] = 0;
m=m+1;
}
while(j < n) {
if (i > 1){
s[1] = 1;
if (i > 2){
s[2] = 2;
if (i > 3){
s[3] = 3;
if (i > 4){
s[4] = 4;
if (i > 5){
s[5] = 5;
if (i > 6){
s[6] = 6;
if (i > 7){
s[7] = 7;
if (i > 8){
s[8] = 8;
if (i > 9){
s[9] = 9;
if (i > 10){
s[10] = 10;
if (i > 11){
s[11] = 11;
if (i > 12){
s[12] = 12;
if (i > 13){
s[13] = 13;
if (i > 14){
s[14] = 14;
if (i > 15){
s[15] = 15;
if (i > 16){
s[16] = 16;
if (i > 17){
s[17] = 17;
if (i > 18){
s[18] = 18;
if (i > 19){
s[19] = 19;
if (i > 20){
s[20] = 20;
if (i > 21){
s[21] = 21;
if (i > 22){
s[22] = 22;
if (i > 23){
s[23] = 23;
if (i > 24){
s[24] = 24;
if (i > 25){
s[25] = 25;
if (i > 26){
s[26] = 26;
if (i > 27){
s[27] = 27;
if (i > 28){
s[28] = 28;
if (i > 29){
s[29] = 29;
if (i > 30){
s[30] = 30;
if (i > 31){
s[31] = 31;
if (i > 32){
s[32] = 32;
if (i > 33){
s[33] = 33;
if (i > 34){
s[34] = 34;
if (i > 35){
s[35] = 35;
if (i > 36){
s[36] = 36;
if (i > 37){
s[37] = 37;
if (i > 38){
s[38] = 38;
if (i > 39){
s[39] = 39;
if (i > 40){
s[40] = 40;
if (i > 41){
s[41] = 41;
if (i > 42){
s[42] = 42;
if (i > 43){
s[43] = 43;
if (i > 44){
s[44] = 44;
if (i > 45){
s[45] = 45;
if (i > 46){
s[46] = 46;
if (i > 47){
s[47] = 47;
if (i > 48){
s[48] = 48;
if (i > 49){
s[49] = 49;
if (i > 50){
s[50] = 50;
if (i > 51){
s[51] = 51;
if (i > 52){
s[52] = 52;
if (i > 53){
s[53] = 53;
if (i > 54){
s[54] = 54;
if (i > 55){
s[55] = 55;
if (i > 56){
s[56] = 56;
if (i > 57){
s[57] = 57;
if (i > 58){
s[58] = 58;
if (i > 59){
s[59] = 59;
if (i > 60){
s[60] = 60;
if (i > 61){
s[61] = 61;
if (i > 62){
s[62] = 62;
if (i > 63){
s[63] = 63;
if (i > 64){
s[64] = 64;
if (i > 65){
s[65] = 65;
if (i > 66){
s[66] = 66;
if (i > 67){
s[67] = 67;
if (i > 68){
s[68] = 68;
if (i > 69){
s[69] = 69;
if (i > 70){
s[70] = 70;
if (i > 71){
s[71] = 71;
if (i > 72){
s[72] = 72;
if (i > 73){
s[73] = 73;
if (i > 74){
s[74] = 74;
if (i > 75){
s[75] = 75;
if (i > 76){
s[76] = 76;
if (i > 77){
s[77] = 77;
if (i > 78){
s[78] = 78;
if (i > 79){
s[79] = 79;
if (i > 80){
s[80] = 80;
if (i > 81){
s[81] = 81;
if (i > 82){
s[82] = 82;
if (i > 83){
s[83] = 83;
if (i > 84){
s[84] = 84;
if (i > 85){
s[85] = 85;
if (i > 86){
s[86] = 86;
if (i > 87){
s[87] = 87;
if (i > 88){
s[88] = 88;
if (i > 89){
s[89] = 89;
if (i > 90){
s[90] = 90;
if (i > 91){
s[91] = 91;
if (i > 92){
s[92] = 92;
if (i > 93){
s[93] = 93;
if (i > 94){
s[94] = 94;
if (i > 95){
s[95] = 95;
if (i > 96){
s[96] = 96;
if (i > 97){
s[97] = 97;
if (i > 98){
s[98] = 98;
if (i > 99){
s[99] = 99;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
j=j+1;
int m = 0;
while (m < 100){
sum = sum + s[m];
m=m+1;
}
sum = sum % 65535;
}
return sum;
}
int main() {
starttime();
int loopcount = getint();
putint(func(loopcount));
putch(10);
stoptime();
return 0;
}

View File

@ -0,0 +1,50 @@
//large loop and large array caculate
int COUNT = 500000;
float loop(float x[], float y[], int length) {
int i = 0;
float accumulator = 0.0;
while (i < length) {
accumulator = accumulator + x[i] * y[i];
i = i + 1;
}
return accumulator;
}
int main() {
int i = 0, j = 0;
int len = getint();
float x[2048];
float y[2048];
float total = 0.0;
float a = 0.0;
float b = 1.0;
starttime();
while ( i < COUNT) {
if (i % 10) {
a = 0.0;
b = 1.0;
} else {
a = a + 0.1;
b = b + 0.2;
}
while ( j < len) {
x[j] = a + j;
y[j] = b + j;
j = j + 1;
}
total = total + loop(x, y, len);
i = i + 1;
}
stoptime();
if ((total - 1430318598848512.000000) <=0.000001 && (total - 1430318598848512.000000) >= -0.000001) {
putint(10);
return 0;
}
else {
putint(1);
return 1;
}
}

View File

@ -0,0 +1,50 @@
int COUNT = 500000;
float loop(float x[], float y[], int length) {
int i = 0;
float accumulator = 0.0;
while (i < length) {
accumulator = accumulator + x[i] * y[i];
i = i + 1;
}
return accumulator;
}
int main() {
int i = 0, j = 0;
int len = getint();
float x[4096];
float y[4096];
float total = 0.0;
float a = 0.0;
float b = 1.0;
starttime();
while ( i < COUNT) {
if (i % 10) {
a = 0.0;
b = 1.0;
} else {
a = a + 0.1;
b = b + 0.2;
}
while ( j < len) {
x[j] = a + j;
y[j] = b + j;
j = j + 1;
}
total = total + loop(x, y, len);
i = i + 1;
}
stoptime();
if ((total - 11442437121638400.000000) <=0.000001 && (total - 11442437121638400.000000) >= -0.000001) {
putint(10);
return 0;
}
else {
putint(1);
return 1;
}
}

View File

@ -0,0 +1,50 @@
int COUNT = 100000;
float loop(float x[], float y[], int length) {
int i = 0;
float accumulator = 0.0;
while (i < length) {
accumulator = accumulator + x[i] * y[i];
i = i + 1;
}
return accumulator;
}
int main() {
int i = 0, j = 0;
int len = getint();
float x[8192];
float y[8192];
float total = 0.0;
float a = 0.0;
float b = 1.0;
starttime();
while ( i < COUNT) {
if (i % 10) {
a = 0.0;
b = 1.0;
} else {
a = a + 0.1;
b = b + 0.2;
}
while ( j < len) {
x[j] = a + j;
y[j] = b + j;
j = j + 1;
}
total = total + loop(x, y, len);
i = i + 1;
}
stoptime();
if ((total - 18338022147751936.000000) <=0.000001 && (total - 18338022147751936.000000) >= -0.000001) {
putint(10);
return 0;
}
else {
putint(1);
return 1;
}
}

View File

@ -0,0 +1,97 @@
int a[1000][1000];
int b[1000][1000];
int c[1000][1000];
const int MAX = 2147483647;
int main(){
int n;
int i;
int j;
int k;
int sum = 0;
i = 0;
while(i<1000)
{
n = getarray(a[i]);
if(n!=1000){
return n;
}
i = i + 1;
}
starttime();
i = 0;
while(i<1000){
j = 0;
while(j<1000){
b[i][j] = a[j][i];
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
while(j<1000){
k = 0;
int temp = 0;
while(k<1000){
temp = temp + a[i][k]*b[k][j];
k = k+1;
}
c[i][j] = temp;
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
if(c[i][j]<temp)
{
temp = c[i][j];
}
j = j+1;
}
j = 0;
while(j<1000){
c[i][j] = temp;
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
c[i][j] = -c[j][i];
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
sum = sum + c[i][j];
j = j+1;
}
i = i+1;
}
stoptime();
putint(sum);
return 0;
}

View File

@ -0,0 +1,97 @@
int a[1000][1000];
int b[1000][1000];
int c[1000][1000];
const int MAX = 2147483647;
int main(){
int n;
int i;
int j;
int k;
int sum = 0;
i = 0;
while(i<1000)
{
n = getarray(a[i]);
if(n!=1000){
return n;
}
i = i + 1;
}
starttime();
i = 0;
while(i<1000){
j = 0;
while(j<1000){
b[i][j] = a[j][i];
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
while(j<1000){
k = 0;
int temp = 0;
while(k<1000){
temp = temp + a[i][k]*b[k][j];
k = k+1;
}
c[i][j] = temp;
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
if(c[i][j]<temp)
{
temp = c[i][j];
}
j = j+1;
}
j = 0;
while(j<1000){
c[i][j] = temp;
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
c[i][j] = -c[j][i];
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
sum = sum + c[i][j];
j = j+1;
}
i = i+1;
}
stoptime();
putint(sum);
return 0;
}

View File

@ -0,0 +1,97 @@
int a[1000][1000];
int b[1000][1000];
int c[1000][1000];
const int MAX = 2147483647;
int main(){
int n;
int i;
int j;
int k;
int sum = 0;
i = 0;
while(i<1000)
{
n = getarray(a[i]);
if(n!=1000){
return n;
}
i = i + 1;
}
starttime();
i = 0;
while(i<1000){
j = 0;
while(j<1000){
b[i][j] = a[j][i];
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
while(j<1000){
k = 0;
int temp = 0;
while(k<1000){
temp = temp + a[i][k]*b[k][j];
k = k+1;
}
c[i][j] = temp;
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
if(c[i][j]<temp)
{
temp = c[i][j];
}
j = j+1;
}
j = 0;
while(j<1000){
c[i][j] = temp;
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
c[i][j] = -c[j][i];
j = j+1;
}
i = i+1;
}
i = 0;
while(i<1000){
j = 0;
int temp = MAX;
while(j<1000){
sum = sum + c[i][j];
j = j+1;
}
i = i+1;
}
stoptime();
putint(sum);
return 0;
}

View File

@ -0,0 +1,35 @@
float myabs(float num) {
if(num>0){
return num;
}
if(num<0){
return -num;
}
}
float func(float data, int num) {
if (num < 0) {
return 0;
}
num=num-1;
data = data + func(data, num);
data = data - func(data, num);
return data;
}
int main() {
starttime();
float a = 1.001;
int num = getint();
float res;
float expect = 0.0;
res = func(a, num);
if (res - expect==0)
putch(112);
stoptime();
return 0;
}

View File

@ -0,0 +1,35 @@
float myabs(float num) {
if(num>0){
return num;
}
if(num<0){
return -num;
}
}
float func(float data, int num) {
if (num < 0) {
return 0;
}
num=num-1;
data = data + func(data, num);
data = data - func(data, num);
return data;
}
int main() {
starttime();
float a = 1.001;
int num = getint();
float res;
float expect = 0.0;
res = func(a, num);
if (res - expect==0)
putch(112);
stoptime();
return 0;
}

View File

@ -0,0 +1,35 @@
float myabs(float num) {
if(num>0){
return num;
}
if(num<0){
return -num;
}
}
float func(float data, int num) {
if (num < 0) {
return 0;
}
num=num-1;
data = data + func(data, num);
data = data - func(data, num);
return data;
}
int main() {
starttime();
float a = 1.001;
int num = getint();
float res;
float expect = 1.001;
res = func(a, num);
if (res - expect==0)
putch(112);
stoptime();
return 0;
}

View File

@ -1,8 +1,7 @@
#include "sylib.h"
int hashmod;
#define maxn 10000000
#define maxm 10000000
const int maxn = 10000000;
const int maxm = 10000000;
int bucket[maxn];
int head[maxn];
int next[maxm];
@ -91,4 +90,5 @@ int main(){
stoptime();
putarray(ms, ans);
return 0;
}

View File

@ -1,8 +1,7 @@
#include "sylib.h"
int hashmod;
#define maxn 10000000
#define maxm 10000000
const int maxn = 10000000;
const int maxm = 10000000;
int bucket[maxn];
int head[maxn];
int next[maxm];
@ -91,4 +90,5 @@ int main(){
stoptime();
putarray(ms, ans);
return 0;
}

View File

@ -1,8 +1,7 @@
#include "sylib.h"
int hashmod;
#define maxn 10000000
#define maxm 10000000
const int maxn = 10000000;
const int maxm = 10000000;
int bucket[maxn];
int head[maxn];
int next[maxm];
@ -91,4 +90,5 @@ int main(){
stoptime();
putarray(ms, ans);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int x[600][600][600];
int y[600][600][600];
@ -58,4 +57,5 @@ int main()
putarray (N, x[i-1][j-1]);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int x[600][600][600];
int y[600][600][600];
@ -58,4 +57,5 @@ int main()
putarray (N, x[i-1][j-1]);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int x[600][600][600];
int y[600][600][600];
@ -58,4 +57,5 @@ int main()
putarray (N, x[i-1][j-1]);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int matrix[20000000];
int a[100000];
@ -49,4 +48,5 @@ int main(){
putint(ans);
putch(10);
return 0;
}

View File

@ -1,4 +1,3 @@
#include "sylib.h"
int matrix[20000000];
int a[100000];
@ -49,4 +48,5 @@ int main(){
putint(ans);
putch(10);
return 0;
}

View File

@ -1,16 +1,14 @@
#include "sylib.h"
int matrix[20000000];
int a[100000];
int transpose(int n, int matrix[], int rowsize)
{
int transpose(int n, int matrix[], int rowsize){
int colsize = n / rowsize;
int i = 0;
int j = 0;
while (i < colsize) {
while (i < colsize){
j = 0;
while (j < rowsize) {
if (i < j) {
while (j < rowsize){
if (i < j){
j = j + 1;
continue;
}
@ -24,32 +22,31 @@ int transpose(int n, int matrix[], int rowsize)
return -1;
}
int main()
{
int main(){
int n = getint();
int len = getarray(a);
starttime();
int i = 0;
while (i < n) {
while (i < n){
matrix[i] = i;
i = i + 1;
}
i = 0;
while (i < len) {
while (i < len){
transpose(n, matrix, a[i]);
i = i + 1;
}
int ans = 0;
i = 0;
while (i < len) {
while (i < len){
ans = ans + i * i * matrix[i];
i = i + 1;
}
if (ans < 0)
ans = -ans;
if (ans < 0) ans = -ans;
stoptime();
putint(ans);
putch(10);
return 0;
}