原创 選擇排序/冒泡排序?

#include<stdio.h> int max(int a[],int len) { int maxid=0; int i=1; for(;i<len;i++ ) { if(a[i]>a[maxid]) { m

原创 牛客 檢測命令是否正確

提取題意,考慮是正向判斷還是反向判斷比較關鍵. 命令只能由小寫字母/AND/OR/NOT組成,不能有括號,不能由NOT開頭且NOT不可以雙否定. import java.util.ArrayList; import java

原创 阿里 3月25日 二維矩陣列選元素最小和

給一個長度爲n,寬度爲3的3*n矩陣,在其每一列取一個數組成一個數組,找到這種數組從i=1到n-1的右一元素減左一元素的絕對值的最小和. 基本思路:每兩列之間選擇最小,貪心. import java.util.Arrays;

原创 WebCralwer_java

import java.util.Scanner; import java.util.ArrayList; //util是utility的縮寫,代表是工具類 public class WebCrawler{ public

原创 循環條件如何判定?

如何去正序分解一個整數並輸出? #include<stdio.h> int main(){ int x; printf("Please input a integer:"); scanf("%d",&x

原创 PTA 猜數字遊戲

#include<stdio.h> int main() { int random,N,count; scanf("%d %d ",&random,&N); int i; count=0; do { sca

原创 Symbols & Models

Programmer: program -> computer: symbol-> CPU ->model It is like the fingers of a pair of hand what is a pretty good

原创 Problem Solving Process of The terminal process terminated with exit code 1

參考前輩的配置VScode C/C++環境的經驗: 成成賜我力量 bat67 參考之後我的配置 c_cpp_properties.json "configurations": [ {

原创 VS code調試js配置-2018年12月20日

VS code原生似乎只是一個寫代碼和管理代碼的編譯器,並不能調試。 我的原問題是:如何才能在控制檯運行函數? 很大一部分時間都在試錯: 1. 照這個方法配置後,得到 按照它的提示進行修改,仍然會提示地址無法識別 2. 他的tasks.

原创 數學上相等的變換,計算機似乎不一定

本題要求編寫程序,計算序列部分和 1 - 1/4 + 1/7 - 1/10 + ... 直到最後一項的絕對值不大於給定精度eps。 輸入格式: 輸入在一行中給出一個正實數eps。 輸出格式: 在一行中按照“sum = S”的格式輸出部分和

原创 PTA-輸出華氏-攝氏溫度轉換表

#include<stdio.h> #include<math.h> float Celsius(int F); int main() { int lower,upper; scanf("%d %d",&lower,&upper

原创 C課程練習-單詞長度-多一種思考

#include <stdio.h> int main() { char s[100]=""; //The way you get the string decides if you can choose traversal ope

原创 尋找鞍點-C課程練習

題目內容: 給定一個n*n矩陣A。矩陣A的鞍點是一個位置(i,j),在該位置上的元素是第i行上的最大數,第j列上的最小數。一個矩陣A也可能沒有鞍點。 你的任務是找出A的鞍點。 輸入格式: 輸入的第1行是一個正整數n, (1<=n<=100

原创 練習5-3 數字金字塔

#include <stdio.h> void pyramid( int n ); int main() { int n; scanf("%d", &n); pyramid(n); ret

原创 動態數組計算平均差等

#include <stdio.h> #include<stdlib.h> #include<math.h> int main(int argc, char** argv) { int length,i; float *array