//------------------------------------------------ #ifdef local freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); #endif //------------------------------------------------
必須加上-Dlocal
-Dlocal
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
參考一
#include<bits/stdc++.h> using namespace std; int main() { //------------------------------------------------ #ifdef local freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); #endif //------------------------------------------------ int n ; while ( cin >> n ) { if ( n == 0 ) { break ; } else { cout << "# UVa " << n << endl ; cout << "### 題目連結:[UVa" << n << "](http://domen111.github.io/UVa-Easy-Viewer/?" << n<<")" << endl ; cout << "### 題述:" << endl ; cout << "### c++ code:" << endl ; cout << "```cpp=" << endl ; cout << "```" << endl ; cout << ":::success" << endl ; cout << "**``sample input``**" << endl ; cout << ":::" << endl ; cout << ":::success" << endl ; cout << "**``sample output``**" << endl ; cout << ":::" << endl ; cout << "#### [返回首頁](https://hackmd.io/@fkleofk/APCS#"<< n << ")" << endl ; cout << "###### tags: `APCS選修` `C++` `UVa`"<< endl ; } } }
<iframe width="100%" height="500" src="https://hackmd.io" frameborder="0"></iframe>
APCS選修
C++
UVa
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up