This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| #include <string.h> | |
| typedef struct node{ | |
| int64_t Udata,Tdata; | |
| Node * next; | |
| }Node; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #define MAX_LINE_LENGTH 256 | |
| typedef unsigned char uch; | |
| #pragma pack(2) | |
| typedef struct BmpFileHeader { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdint.h> | |
| #include<stdlib.h> | |
| void swap(int *p1,int *p2){ | |
| int temp; | |
| temp=*p1; | |
| *p1=*p2; | |
| *p2=temp; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MAX_SET_NUM 200005 | |
| typedef struct { | |
| int *array; | |
| int *attack; | |
| int size; | |
| int capacity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| typedef struct { | |
| long long *health; | |
| long long *attack; | |
| long long *index; | |
| long long Total_Atk; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| int8_t Z1[2000006],Z2[2000006]; | |
| void getZarr(char* str, int8_t Z[]); | |
| void search(char* text, char* pattern,int8_t re) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| double get_cpu_usage(int pid) { | |
| char filename[30]; | |
| sprintf(filename, "/proc/%d/stat", pid); | |
| FILE* file = fopen(filename, "r"); | |
| if (file == NULL) { | |
| printf("Failed to open file: %s\n", filename); | |
| return -1; | |
| } | |
| // 讀取文件中的第一行 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| miku@DESKTOP-HLSSCVT:~$ cd Final | |
| miku@DESKTOP-HLSSCVT:~/Final$ cd P3 | |
| miku@DESKTOP-HLSSCVT:~/Final/P3$ ls | |
| a.out fin03.c linuxlist.h makefile schedule.c schedule.h | |
| miku@DESKTOP-HLSSCVT:~/Final/P3$ make | |
| gcc fin03.c schedule.c -lm -o fin03 | |
| In file included from schedule.h:4, | |
| from schedule.c:5: | |
| linuxlist.h:99: warning: "offsetof" redefined | |
| 99 | #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| int N, M; | |
| int maze [MAX_N] [MAX_M]; | |
| int dis [MAX_N][MAX_M]; | |
| 112 | |
| int dijkstra(int sx, int sy, int tx, int ty) | |
| 1130 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "################### Magic vimrc ################### | |
| " ctrl+n Enable/disable mouse | |
| " ctrl+b Switch to text/binary | |
| " ctrl+j To utf-8 file | |
| " ctrl+t Convert tab to spaces | |
| " ctrl+l Toggle line breaking | |
| " ctrl+f Switch to full/simple | |
| "####################################################### | |
| set nocompatible |
OlderNewer