Encode the problem given via reference for submission in the `ref` data format. Args: problem (str): A reference to an uploaded problem (problem ID). Returns: Encoded submission dictionary.
(problem)
| 347 | |
| 348 | |
| 349 | def encode_problem_as_ref(problem): |
| 350 | """Encode the problem given via reference for submission in the `ref` data |
| 351 | format. |
| 352 | |
| 353 | Args: |
| 354 | problem (str): |
| 355 | A reference to an uploaded problem (problem ID). |
| 356 | |
| 357 | Returns: |
| 358 | Encoded submission dictionary. |
| 359 | """ |
| 360 | |
| 361 | if not isinstance(problem, str): |
| 362 | raise TypeError("unsupported problem reference type") |
| 363 | |
| 364 | return { |
| 365 | 'format': 'ref', |
| 366 | 'data': problem |
| 367 | } |
| 368 | |
| 369 | |
| 370 | def encode_problem_as_bq(problem): |
no outgoing calls