Tệp được phân loại theo cách tổ chức dữ liệu vì mỗi loại dữ liệu (văn bản, hình ảnh, âm thanh, ...) cần được đọc, ghi, xử lí khác nhau mới nhanh và sử dụng tài nguyên máy hiệu quả nhất.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
d = dict() | |
with open('bai3.inp') as f: | |
for i in f.readlines(): | |
for j in '.,;!?': | |
i = i.replace(j, ' ') | |
for j in i.split(): | |
d[j] = d.get(j, 0) + 1 | |
l = [(value, key) for (key, value) in d.items()] | |
l.sort(reverse=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* File name are supposed to be in upper case, but lower case names look more *mordern*. | |
* `buy.pas' run first, read input from `buy.inp', write to `buy.out' | |
* `set.pas' run next, read from `set.inp', write to `set.out' | |
* `play.pas' run last, read from `map.inp', write to `decision.out' | |
* (LMAO dunno how to sort files in Gist) | |
*) | |
var | |
f : text; | |
a : array[1..10] of qword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
This module contains code from | |
Think Python by Allen B. Downey | |
http://thinkpython.com/code/Card.py | |
Copyright 2016 Raphael McSinyx | |
Copyright 2012 Allen B. Downey | |
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Trò chơi tìm chữ 3 <http://laptrinh.ntu.edu.vn/Problem/Details/5548> | |
* | |
* Copyright (C) 2016 Raphael McSinyx | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CIRCENUM - Số vòng <http://laptrinh.ntu.edu.vn/Problem/Details/5548> | |
* | |
* Copyright (C) 2016 Raphael McSinyx | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Test the performance of XOR query | |
# Copyright (C) 2016 Raphael McSinyx | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# VOA Learning English Broadcast Downloader | |
# Copyright (C) 2016,2017 Raphael McSinyx | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import curses | |
import json | |
import python_mpv_zws as mpv | |
with open('yt.json') as f: | |
DATA = json.load(f) | |
for i in DATA: |
NH airline mới mở N chặng bay mới kết nối N+1 địa điểm du lịch với nhau, sao cho giữa 2 địa điểm bất kỳ luôn có một đường bay, các địa điểm du lịch được đánh số từ 1 đến N+1. Do được giải nhất kỳ thi tin học Quốc gia năm ngoái, Tèo đã được tặng một vé vip miễn phí trên toàn bộ N chặng bay này. Tèo đang lên lịch trình du lịch để tham quan hết tất cả các địa điểm. Trong lúc lập lịch, Tèo sẽ phải tính xem, liệu có nên đi từ địa điểm A đến địa điểm B không, nếu có thì phải bay mấy chặng bay. Em hãy giúp Tèo để cậu sớm có thể đi du lịch.
OlderNewer