實驗源代碼
//Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("請輸入矩陣第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可傳遞閉包關系矩陣是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元關系的可傳遞閉包\n"); void warshall(int,int); int k , n; printf("請輸入矩陣的行數 i: "); scanf("%d",&k);
四川大學實驗報告 printf("請輸入矩陣的列數 j: "); scanf("%d",&n); warshall(k,n); }
標簽:
warshall
離散
實驗
上傳時間:
2016-06-27
上傳用戶:梁雪文以
RX-8801 SA Features built-in 32.768 kHz DTCXO, High Stability Supports l'C-Bus's high speed mode (400 kHz)Alarm interrupt function for day, date, hour, and minute settings Fixed-cycle timer interrupt function Time update interrupt function32.768 kHz output with OE function Auto correction of leap years Wide interface voltage range: 2.2 V to 5.5 V Wide time-keeping voltage range:1.8 V to 5.5 V Low current consumption: 0.84A/3V (Typ.)is an IC bus interface-compliant real-time clock which includes a 32.768 kHz DTCXO In addition to providing a calendar (year, month, date, day, hour, minute, second) function and a clock counter function, this module provides an abundance of other functions including an alarm function, fixed-cycle timer unction, time update interrupt function, and 32.768 kHz output function.The devices in this module are fabricated via a C-MOS process for low current consumption, which enables ong-term battery back-up.
標簽:
時鐘芯片
rx8025t
上傳時間:
2022-06-17
上傳用戶: