原创 python中的簡單矩陣運算
import numpy as np a = np.array([[1,2],[3,4]]) b = np.array([[5,6],[7,8]]) plus = a + b minus = a - b mul = a * b
原创 CCF201703-3
CCF201703-3 #include<iostream> #include<string> #include<algorithm> using namespace std; void out(string s) { cout
原创 ccf 201909-2
ccf 201909-2 題目 評測100分代碼 #include<iostream> using namespace std; void func(){ int m,n; int num; cin>>n; int s
原创 CCF201903-2
CCF201903-2 題目 評測100分代碼 #include<iostream> #include<string> using namespace std; void print_ans(int* ans){ for(int
原创 CCF201703-2
CCF201703-2 #include<iostream> #include<vector> #include<algorithm> #include<iterator> using namespace std; void ou
原创 CCF201403-2
CCF201403-2 #include<iostream> using namespace std; typedef struct{ int x1,x2; int y1,y2; int Num; }Window; Wi
原创 CCF201403-1
CCF201403-1 #include<iostream> #include<vector> using namespace std; void func(){ int n; int ans = 0; cin>>n;
原创 CCF201403-3 命令行選項
CCF201403-3 命令行選項 評測100分代碼 #include<iostream> #include<stdio.h> #include<string> #include<cstring> #include<vector>
原创 CCF201912-3
CCF201912-3 70分 樣例全部通過 待更正。。。 #include<iostream> #include<vector> #include<string> #include<stdio.h> #include<algor
原创 CCF201709-2
CCF201709-2 #include<iostream> #include <algorithm> using namespace std; typedef struct { int time; int num_key;
原创 CCF201912-1
CCF201912-1 #include<iostream> #include<vector> using namespace std; bool have(int x){ if(x%7==0) return true;
原创 日期差值
日期差值 scanf ("%4d%2d%2d",&y1,&m1,&d1) YYYYMMDD格式數據輸入 預處理 二維數組的初始化可以按行分段賦值,也可按行連續賦值。 於數組 a[5][3],按行分段賦值應該寫作: int a[5]
原创 CCF201912-2
CCF201912-2 #include<vector> #include<algorithm> #include<iostream> using namespace std; typedef struct{ lon
原创 CCF201712-4
CCF201712-4 80分 代碼 原因:邊權有可能超出int表示範圍(第二個爲滿分代碼) #include<iostream> #include<vector> #define INF 10000000 using name
原创 CCF201403-4
CCF201403-4 #include<iostream> #include<queue> #include<vector> using namespace std; typedef struct route{ long l