高中生程式解題系統
ZeroJudge, An Online Judge System For Beginners

An Online Judge System For Begneers

AC: Accept.
NA: Not Accepted. Some test cases were not currect.
WA: Wrong Answer with the line number and current answer.
TLE: Time Limit Exceed.
MLE: Memory Limit Exceed.
OLE: Output Limit Exceed.
RE: Runtime Error e.q.: Out of range in Array.
RF: Restricted Function.
CE: Compile Error. The Compiler
SE: System Error, undefined Errors.

本系統目前支援的程式語言如下:

User's guide

APCS 5/29

倒數17天

APCS 5/28

倒數18天

實驗課練習

Every time you think for 60 seconds, a minute passes in the world.

2333

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int idx=0;
string track;
// return cost and head and tail
ll seq(int &head, int &tail) {
    ll total = 0, t;
    head = tail = -1;
    while (true) {
        if (idx>=track.length()) return total;
        if (track[idx]=='T') {
            t = stoi(track.substr(idx+1,2));
            idx += 3;
            if (tail<0) head = t;
            else total += abs(tail-t);
            tail = t;
        } else if (track[idx]=='L') {
            t = stoi(track.substr(idx+1,1));
            idx += 2;
            int h,e;
            ll cost = seq(h,e);
            if (tail<0) head = h;
            else total += abs(tail-h);
            tail = e;
            total += cost*t+abs(h-e)*(t-1);
        } else { // E
            idx += 1;
            return total;
        }
    }
}

int main() {
    int xx,i,j;
    cin >>track;
    ll total = seq(i,j);
    total += abs(10-i);
    cout << total <<endl;
    return 0;
}

只有四題!

只有四題!努力!題目請看仔細,有兩題a開頭的題目
加油!

Latest Problems

a004. 文文的求婚
n775. 10573 - Geometry Paradox -- UVA
n774. 10678 - The Grazing Cow -- UVA
n773. 10424-Love Calculator -- UVA
i071. 風景 (Landscape) -- TOI練習賽202204新手組第3題
n768. 10370 - Above Average -- UVA
k732. 2. 特殊位置 -- 2023年6月APCS
n764. 10282 - Babelfish -- UVA
k933. 10397 - Connect the Campus -- UVA
j604. 10903 - Rock-Paper-Scissors Tournament -- UVA
i919. 12372 - Packing for Holiday -- UVA
e680. 11947 - Cancer or Scorpio -- UVA
e656. 11137 - Ingenuous Cubrency -- UVA
e637. 10465 - Homer Simpson -- UVA
e596. 12335 - Lexicographic Order -- UVA
e531. 10415 - Eb Alto Saxophone Player -- UVA
e589. 11223 - O: dah dah dah! -- UVA
e586. 01208 - Oreon -- UVA
e585. 12797 - Letters -- UVA
e582. 00555 - Bridge Hands -- UVA
e581. 11067 - Little Red Riding Hood -- UVA
e580. 00696 - How Many Knights -- UVA
e574. 10404 - Bachet's Game -- UVA
e568. 11639 - Guard the Land -- UVA
Top Coder
aaa55322aaa (兔瓦斯) 2999/ 92%
liouzhou_101 (王启圣) 2388/ 73%
becaido (Caido) 2028/ 62%
hshua (hshua) 2015/ 62%
qqqq123 (unknown) 2005/ 61%
asnewchien@g ... (david) 1883/ 58%
1360467-8@g. ... (三國迷李牧粉) 1750/ 54%
buanyz03 (張晁瑋) 1746/ 53%
inversion (「我們所認識的可符香是個像天使...) 1699/ 52%
mathfan2 (mathfan) 1693/ 52%
more...
Top Author
snail (蝸牛)
liouzhou_101 (王启圣)
ig99lp33lp33 (위즈원)
morris1028 (碼畜)
mushroom.cs9 ... (mushroom)
p3a_owhj (阿普二信)
becaido (Caido)
pcshic (PCSHIC)
hshua (hshua)
VacationClub (雄中公假社)
Top School
1: 臺北市私立延平高級中學
2: 國立嘉義高級中學
3: 新北市立板橋高級中學
4: 臺北市立第一女子高級中學
5: 臺北市立中山女子高級中學
6: 臺北市立成功高級中學
7: 高雄市立高雄高級中學
8: 臺北市立建國高級中學
9: 國立臺中高級工業職業學校
10: 國立臺灣師範大學
more...