惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
月光博客
月光博客
S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
J
Java Code Geeks
酷 壳 – CoolShell
酷 壳 – CoolShell
TaoSecurity Blog
TaoSecurity Blog
V
Visual Studio Blog
博客园 - 叶小钗
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
罗磊的独立博客
雷峰网
雷峰网
T
Tor Project blog
L
LINUX DO - 最新话题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
Spread Privacy
Spread Privacy
C
CERT Recently Published Vulnerability Notes
腾讯CDC
Cloudbric
Cloudbric
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
T
Troy Hunt's Blog
T
Threatpost
C
Check Point Blog
Vercel News
Vercel News
I
Intezer
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
D
DataBreaches.Net
SecWiki News
SecWiki News
Help Net Security
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
AI
AI
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
B
Blog RSS Feed
Attack and Defense Labs
Attack and Defense Labs

Whexy Blog

We lost the AIxCC. So, what now? Arm VMM with Apple's Hypervisor Framework Driving WaveShare E‐Paper Display with a Raspberry Pi Pico in MicroPython Use cgroup v2 inside docker containers Annual Hit Piece: Fuzzing Top Conference Paper Debunking Report Solving SSH Key Login Issues on Synology NAS Can SSD Cache Improve Synology NAS Write Speeds? Virtualization is all you need Running Windows Games on Mac Without Virtual Machines Tears of the Kingdom: End of an Era Anonymous CDN Traffic Relay Self-host Relay Service with CDN Home Networking Solution Building Your Own Blog System Connecting Smart Devices to SUSTech Campus Network Function Color Theory Stop Forkin' Around: Faster Creating of Large Processes on Linux PMU Interrupts: How to handle them Asynchronous Mutex Using QEMU to run Linux images on M1 Macbook Alligator In Vest - My first research work Experience Using Several Plugins in Complex LaTeX Projects Variance in Rust Understanding Rust Generic Traits SUSTeam: Ultimate Gaming Platform Inline Assembly Language in C React Learning Notes Building a School Bus Schedule App for Apple Watch 12307 Train Ticket Purchase Platform Sakai and Local Folder Synchronization Setting Up Remote Backup for macOS Shell Script for Automatically Logging into SUSTech Campus Network Building a Movie Streaming System in the Dorm
Building a Super Simple OpenJudge in Two Nights
Whexy · 2019-09-26 · via Whexy Blog

Whexy /

September 26, 2019

At the beginning of sophomore year, to serve the vast number of students suffering from the Data Structures and Algorithms course, I wrote a debugging platform. The code is a mess, but the product concept is still good.

Taking the two students I helped last week as examples. Student A got stuck on the third week's lab "Star Herding" and spent three days without finding the problem. Later, we used a random data generator for comparison testing, he made several modifications, and finally passed. Student B also got stuck on the same problem. But the random data generator ran thousands of test cases without finding any errors. Finally, we manually constructed some very extreme test cases, and she passed too.

From Student A's experience, your program might not have considered some cases and needs random data testing. From Student B's experience, the program might only lack consideration of extreme cases, where random data is also hard to be effective.

I hope this testing website can help solve these two problems.

Platform URL: http://ac.whexy.com

The website is very intuitive to use: select the problem, choose the language, paste the code, and upload for testing. After testing is complete, you get feedback. Click to copy data for easy adjustment.

After you submit your program, the platform will run the data generator, standard code, and your code in the background. It compares the running results of the code to generate feedback. This is not an OJ system. Since data is randomly generated each time for testing, you might get different results each time.

This way, Student A's problem is solved. He just needs to paste his Java code here to get some data where his code fails. By analyzing this data, he can find the problems in his code.

Unlike Student A, Student B passed many random data tests, only failing to consider some extreme cases thoroughly. Due to server performance considerations, only 20 sets of random data are tested per submission, which is far from enough. The platform adopts a new approach.

We hypothesize that data that causes others to fail is more likely to make you fail too. If a program fails on randomly generated data, this set of data will be added to the "important data set". Before the 20 random tests, the testing platform will first test whether your program can pass the important data set.

As the number of submissions increases, the important data set becomes more and more reliable.

Additionally, you can contribute extreme data you construct through the "I want to contribute data" function. Contributing data requires you to submit both input and output. The platform's standard code will review it, and if the running result matches the output you provided, this set of data will also be directly added to the important data set. Through this function, we hope the test data becomes more comprehensive and rich.

© LICENSED UNDER CC BY-NC-SA 4.0