結果
問題 | No.2508 Discriminant |
ユーザー |
![]() |
提出日時 | 2023-10-23 15:24:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 685 bytes |
コンパイル時間 | 863 ms |
コンパイル使用メモリ | 82,188 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 10:20:03 |
合計ジャッジ時間 | 1,513 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>#include <iostream>#include <string>#include <set>#include <map>#include <vector>#include <queue>#define ll long long#define db doubleusing namespace std;const ll N = 1e5 + 100;ll tt;char a[N],p[N],q[N];void solve() {scanf("%s",a + 1);scanf("%s",p + 1);scanf("%s",q + 1);bool ans = 1;ll n = strlen(p + 1);ll m = strlen(q + 1);if (n != m) {ans = 0;} else {for (ll i = 1;i <= n;i++) {if (p[i] != q[i]) {ans = 0;break;}}}if (ans) {printf("No\n");} else {printf("Yes\n");}}int main() {tt = 1;while(tt) {solve();tt--;}return 0;}