『STA - R5』5k.sync.closer

Luogu
IDLGP10397
Time1000ms
Memory512MB
DifficultyP1
字符串O2优化
给定一条 [`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句,输出其操作的文件名称。 形式化地,[`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句都应该恰好是 ```cpp std::freopen("<title>","<mode>",<stream>); ``` 其中 `<title>` 为其操作的文件名称。其至少包含一个字符,并且只可能包含下列几种字符: - 大写英文字符; - 小写英文字符; - 阿拉伯数字; - 英文半角句点 `.`。 `<mode>` 为文件访问标记,其只可能为 `r`、`w`、`a` 中的一种。`<stream>` 为文件流,其只可能为 `stdin`、`stdout`、`stderr` 中的一种。 你需要回答 $T$ 次询问。 ## Input **本题单个测试点内含有多组询问。** 第一行一个正整数 $T$,代表询问次数。 对于每组询问:一行一个字符串,代表一条 [`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句。 ## Output 对于每组询问,输出一行一个字符串,代表其操作的文件名称。 [samples] ## Note **本题采用捆绑测试。** 对于 $100\%$ 的数据: - $1 \le T \le 1000$。 - 每条语句的长度均不超过 $1000$。 具体部分分分配如下: - Subtask 1 (30pts):保证文件名为 `5k.sync.closer`。 - Subtask 2 (30pts):保证文件名长度为 $1$。 - Subtask 3 (40pts):无特殊限制。
Samples
Input #1
9
std::freopen("5k.sync.closer","r",stdin);
std::freopen("5k.sync.closer","r",stdout);
std::freopen("5k.sync.closer","r",stderr);
std::freopen("5k.sync.closer","w",stdin);
std::freopen("5k.sync.closer","w",stdout);
std::freopen("5k.sync.closer","w",stderr);
std::freopen("5k.sync.closer","a",stdin);
std::freopen("5k.sync.closer","a",stdout);
std::freopen("5k.sync.closer","a",stderr);
Output #1
5k.sync.closer
5k.sync.closer
5k.sync.closer
5k.sync.closer
5k.sync.closer
5k.sync.closer
5k.sync.closer
5k.sync.closer
5k.sync.closer
API Response (JSON)
{
  "problem": {
    "name": "『STA - R5』5k.sync.closer",
    "description": {
      "content": "给定一条 [`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句,输出其操作的文件名称。 形式化地,[`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句都应该恰好是 ```cpp std::freopen(\"<title>\",\"<mo",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGP10397"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "给定一条 [`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句,输出其操作的文件名称。\n\n形式化地,[`std::freopen`](https://zh.cppreference.com/w/cpp/io/c/freopen) 语句都应该恰好是\n\n```cpp\nstd::freopen(\"<title>\",\"<mo...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments