parent
eb49d342db
commit
b790144d80
@ -0,0 +1,114 @@ |
||||
|
||||
package net.lensfrex.oj.collector.data; |
||||
|
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
import java.util.List; |
||||
|
||||
@SuppressWarnings("unused") |
||||
public class QuestionDetail { |
||||
@SerializedName("questionFrontendId") |
||||
private String id; |
||||
|
||||
private String title; |
||||
@SerializedName("translatedTitle") |
||||
private String chineseTitle; |
||||
|
||||
private String content; |
||||
@SerializedName("translatedContent") |
||||
private String chineseContent; |
||||
|
||||
private String difficulty; |
||||
private List<String> hints; |
||||
|
||||
@SerializedName("topicTags") |
||||
private List<Tag> tags; |
||||
|
||||
private boolean isPaidOnly; |
||||
|
||||
public boolean isPaidOnly() { |
||||
return isPaidOnly; |
||||
} |
||||
|
||||
public void setPaidOnly(boolean paidOnly) { |
||||
isPaidOnly = paidOnly; |
||||
} |
||||
|
||||
public String getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(String id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
public String getChineseTitle() { |
||||
return chineseTitle; |
||||
} |
||||
|
||||
public void setChineseTitle(String chineseTitle) { |
||||
this.chineseTitle = chineseTitle; |
||||
} |
||||
|
||||
public String getContent() { |
||||
return content; |
||||
} |
||||
|
||||
public void setContent(String content) { |
||||
this.content = content; |
||||
} |
||||
|
||||
public String getChineseContent() { |
||||
return chineseContent; |
||||
} |
||||
|
||||
public void setChineseContent(String chineseContent) { |
||||
this.chineseContent = chineseContent; |
||||
} |
||||
|
||||
public String getDifficulty() { |
||||
return difficulty; |
||||
} |
||||
|
||||
public void setDifficulty(String difficulty) { |
||||
this.difficulty = difficulty; |
||||
} |
||||
|
||||
public List<String> getHints() { |
||||
return hints; |
||||
} |
||||
|
||||
public void setHints(List<String> hints) { |
||||
this.hints = hints; |
||||
} |
||||
|
||||
public List<Tag> getTags() { |
||||
return tags; |
||||
} |
||||
|
||||
public void setTags(List<Tag> tags) { |
||||
this.tags = tags; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
String sb = "QuestionDetail{" + "id=" + id + |
||||
", title='" + title + '\'' + |
||||
", chineseTitle='" + chineseTitle + '\'' + |
||||
", content='" + content + '\'' + |
||||
", chineseContent='" + chineseContent + '\'' + |
||||
", difficulty='" + difficulty + '\'' + |
||||
", hints=" + hints + |
||||
", tags=" + tags + |
||||
'}'; |
||||
return sb; |
||||
} |
||||
} |
@ -1,154 +0,0 @@ |
||||
|
||||
package net.lensfrex.oj.collector.data; |
||||
|
||||
import java.util.List; |
||||
import javax.annotation.Generated; |
||||
|
||||
import com.google.gson.annotations.Expose; |
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
@Generated("net.hexar.json2pojo") |
||||
@SuppressWarnings("unused") |
||||
public class Result { |
||||
@SerializedName("_id") |
||||
private String id; |
||||
@Expose |
||||
private String title; |
||||
@Expose |
||||
private Object contest; |
||||
@Expose |
||||
private String description; |
||||
@SerializedName("input_description") |
||||
private String inputDescription; |
||||
@SerializedName("output_description") |
||||
private String outputDescription; |
||||
@Expose |
||||
private String difficulty; |
||||
@Expose |
||||
private String hint; |
||||
@SerializedName("memory_limit") |
||||
private Long memoryLimit; |
||||
@SerializedName("time_limit") |
||||
private Long timeLimit; |
||||
@Expose |
||||
private List<Sample> samples; |
||||
@Expose |
||||
private List<String> tags; |
||||
|
||||
public String getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(String id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
public Object getContest() { |
||||
return contest; |
||||
} |
||||
|
||||
public void setContest(Object contest) { |
||||
this.contest = contest; |
||||
} |
||||
|
||||
public String getDescription() { |
||||
return description; |
||||
} |
||||
|
||||
public void setDescription(String description) { |
||||
this.description = description; |
||||
} |
||||
|
||||
public String getDifficulty() { |
||||
return difficulty; |
||||
} |
||||
|
||||
public void setDifficulty(String difficulty) { |
||||
this.difficulty = difficulty; |
||||
} |
||||
|
||||
public String getHint() { |
||||
return hint; |
||||
} |
||||
|
||||
public void setHint(String hint) { |
||||
this.hint = hint; |
||||
} |
||||
|
||||
public Long getMemoryLimit() { |
||||
return memoryLimit; |
||||
} |
||||
|
||||
public void setMemoryLimit(Long memoryLimit) { |
||||
this.memoryLimit = memoryLimit; |
||||
} |
||||
|
||||
public Long getTimeLimit() { |
||||
return timeLimit; |
||||
} |
||||
|
||||
public void setTimeLimit(Long timeLimit) { |
||||
this.timeLimit = timeLimit; |
||||
} |
||||
|
||||
public String getInputDescription() { |
||||
return inputDescription; |
||||
} |
||||
|
||||
public void setInputDescription(String inputDescription) { |
||||
this.inputDescription = inputDescription; |
||||
} |
||||
|
||||
public String getOutputDescription() { |
||||
return outputDescription; |
||||
} |
||||
|
||||
public void setOutputDescription(String outputDescription) { |
||||
this.outputDescription = outputDescription; |
||||
} |
||||
|
||||
public List<Sample> getSamples() { |
||||
return samples; |
||||
} |
||||
|
||||
public void setSamples(List<Sample> samples) { |
||||
this.samples = samples; |
||||
} |
||||
|
||||
public List<String> getTags() { |
||||
return tags; |
||||
} |
||||
|
||||
public void setTags(List<String> tags) { |
||||
this.tags = tags; |
||||
} |
||||
|
||||
|
||||
|
||||
@Override |
||||
public String toString() { |
||||
final StringBuffer sb = new StringBuffer("Result{"); |
||||
sb.append("id='").append(id).append('\''); |
||||
sb.append(", title='").append(title).append('\''); |
||||
sb.append(", contest=").append(contest); |
||||
sb.append(", description='").append(description).append('\''); |
||||
sb.append(", difficulty='").append(difficulty).append('\''); |
||||
sb.append(", hint='").append(hint).append('\''); |
||||
sb.append(", memoryLimit=").append(memoryLimit); |
||||
sb.append(", timeLimit=").append(timeLimit); |
||||
sb.append(", inputDescription='").append(inputDescription).append('\''); |
||||
sb.append(", outputDescription='").append(outputDescription).append('\''); |
||||
sb.append(", samples=").append(samples); |
||||
sb.append(", tags=").append(tags); |
||||
sb.append('}'); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -1,32 +0,0 @@ |
||||
|
||||
package net.lensfrex.oj.collector.data; |
||||
|
||||
import javax.annotation.Generated; |
||||
import com.google.gson.annotations.Expose; |
||||
|
||||
@Generated("net.hexar.json2pojo") |
||||
@SuppressWarnings("unused") |
||||
public class Sample { |
||||
|
||||
@Expose |
||||
private String input; |
||||
@Expose |
||||
private String output; |
||||
|
||||
public String getInput() { |
||||
return input; |
||||
} |
||||
|
||||
public void setInput(String input) { |
||||
this.input = input; |
||||
} |
||||
|
||||
public String getOutput() { |
||||
return output; |
||||
} |
||||
|
||||
public void setOutput(String output) { |
||||
this.output = output; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,26 @@ |
||||
package net.lensfrex.oj.collector.data; |
||||
|
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
public class Tag { |
||||
private String name; |
||||
|
||||
@SerializedName("translatedName") |
||||
private String chineseName; |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getChineseName() { |
||||
return chineseName; |
||||
} |
||||
|
||||
public void setChineseName(String chineseName) { |
||||
this.chineseName = chineseName; |
||||
} |
||||
} |
@ -0,0 +1 @@ |
||||
{"operationName":"questionData","variables":{"titleSlug":"%s"},"query":"query questionData($titleSlug: String!) { question(titleSlug: $titleSlug) { questionId questionFrontendId categoryTitle boundTopicId title titleSlug content translatedTitle translatedContent isPaidOnly difficulty likes dislikes isLiked similarQuestions contributors { username profileUrl avatarUrl __typename } langToValidPlayground topicTags { name slug translatedName __typename } companyTagStats codeSnippets { lang langSlug code __typename } stats hints solution { id canSeeDetail __typename } status sampleTestCase metaData judgerAvailable judgeType mysqlSchemas enableRunCode envInfo book { id bookName pressName source shortDescription fullDescription bookImgUrl pressImgUrl productUrl __typename } isSubscribed isDailyQuestion dailyRecordStatus editorType ugcQuestionId style exampleTestcases jsonExampleTestcases __typename }}"} |
@ -0,0 +1 @@ |
||||
{"query":" query problemsetQuestionList($categorySlug: String, $limit: Int, $skip: Int, $filters: QuestionListFilterInput) { problemsetQuestionList( categorySlug: $categorySlug limit: $limit skip: $skip filters: $filters ) { hasMore total questions { acRate difficulty freqBar frontendQuestionId isFavor paidOnly solutionNum status title titleCn titleSlug topicTags { name nameTranslated id slug } extra { hasVideoSolution topCompanyTags { imgUrl slug numSubscribed } } } }} ","variables":{"categorySlug":"","skip":%d,"limit":%d,"filters":{}}} |
@ -0,0 +1,8 @@ |
||||
{ |
||||
"operationName": "questionData", |
||||
"variables": { |
||||
"titleSlug": "two-sum" |
||||
}, |
||||
"query": "query questionData($titleSlug: String!) {\n question(titleSlug: $titleSlug) {\n questionId\n questionFrontendId\n categoryTitle\n boundTopicId\n title\n titleSlug\n content\n translatedTitle\n translatedContent\n isPaidOnly\n difficulty\n likes\n dislikes\n isLiked\n similarQuestions\n contributors {\n username\n profileUrl\n avatarUrl\n __typename\n }\n langToValidPlayground\n topicTags {\n name\n slug\n translatedName\n __typename\n }\n companyTagStats\n codeSnippets {\n lang\n langSlug\n code\n __typename\n }\n stats\n hints\n solution {\n id\n canSeeDetail\n __typename\n }\n status\n sampleTestCase\n metaData\n judgerAvailable\n judgeType\n mysqlSchemas\n enableRunCode\n envInfo\n book {\n id\n bookName\n pressName\n source\n shortDescription\n fullDescription\n bookImgUrl\n pressImgUrl\n productUrl\n __typename\n }\n isSubscribed\n isDailyQuestion\n dailyRecordStatus\n editorType\n ugcQuestionId\n style\n exampleTestcases\n jsonExampleTestcases\n __typename\n }\n}\n" |
||||
} |
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,63 @@ |
||||
{ |
||||
"data": { |
||||
"problemsetQuestionList": { |
||||
"__typename": "QuestionListNode", |
||||
"questions": [ |
||||
{ |
||||
"__typename": "QuestionLightNode", |
||||
"acRate": 0.5265447404489151, |
||||
"difficulty": "EASY", |
||||
"freqBar": 0, |
||||
"paidOnly": false, |
||||
"status": "NOT_STARTED", |
||||
"frontendQuestionId": "1", |
||||
"isFavor": false, |
||||
"solutionNum": 18322, |
||||
"title": "Two Sum", |
||||
"titleCn": "两数之和", |
||||
"titleSlug": "two-sum", |
||||
"topicTags": [ |
||||
{ |
||||
"id": "wg0rh", |
||||
"name": "Array", |
||||
"slug": "array", |
||||
"nameTranslated": "数组", |
||||
"__typename": "CommonTagNode" |
||||
}, |
||||
{ |
||||
"id": "wzve3", |
||||
"name": "Hash Table", |
||||
"slug": "hash-table", |
||||
"nameTranslated": "哈希表", |
||||
"__typename": "CommonTagNode" |
||||
} |
||||
], |
||||
"extra": { |
||||
"companyTagNum": 394, |
||||
"hasVideoSolution": true, |
||||
"topCompanyTags": [ |
||||
{ |
||||
"imgUrl": "https://pic.leetcode-cn.com/5352d58e4b296e0704f20cfd99ecaec7af71d079b015923c72928650312c55b8-Messages Image(3349252251).png", |
||||
"slug": "amazon", |
||||
"__typename": "CommonTagNode" |
||||
}, |
||||
{ |
||||
"imgUrl": "https://pic.leetcode-cn.com/45a64add888e66ff6d3c551bed948528715996937b877aaf6fdc08eae74789f5-google-logo-png-open-2000.png", |
||||
"slug": "google", |
||||
"__typename": "CommonTagNode" |
||||
}, |
||||
{ |
||||
"imgUrl": "https://pic.leetcode-cn.com/cca55ecdfb504378955a9bf4f2f33897bb84f04f9cbf84ea96321ce5d959ee13-adobe1.png", |
||||
"slug": "adobe", |
||||
"__typename": "CommonTagNode" |
||||
} |
||||
], |
||||
"__typename": "QuestionExtraInfoNode" |
||||
} |
||||
} |
||||
], |
||||
"hasMore": true, |
||||
"total": 2696 |
||||
} |
||||
} |
||||
} |
@ -1,25 +1,20 @@ |
||||
# {{title}} |
||||
# {{englishTitle}} | {{title}} |
||||
|
||||
-------------------------------- |
||||
## 题目: |
||||
|
||||
{{description}} |
||||
{{englishContent}} |
||||
|
||||
## 输入: |
||||
> {{inputDescription}} |
||||
--- |
||||
|
||||
## 输出: |
||||
> {{outputDescription}} |
||||
{{content}} |
||||
|
||||
-------------------------------- |
||||
## 提示:{{hint}} |
||||
## 提示: |
||||
|
||||
{{examples}} |
||||
{{hints}} |
||||
|
||||
-------------------------------- |
||||
- 时间限制:{{timeLimit}} |
||||
- 内存限制:{{memoryLimit}} |
||||
|
||||
- 等级:{{level}} |
||||
- 难度:{{level}} |
||||
- id:{{id}} |
||||
- 标签:{{tags}} |
||||
|
Loading…
Reference in new issue