結果

問題 No.762 PDCAパス
ユーザー tailstails
提出日時 2018-12-10 00:18:05
言語 cLay
(20240104-1)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 406 bytes
コンパイル時間 3,064 ms
コンパイル使用メモリ 165,016 KB
最終ジャッジ日時 2024-04-27 04:57:13
合計ジャッジ時間 3,777 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp:443:6: error: conflicting declaration ‘mint r’
  443 | mint r;
      |      ^
main.cpp:438:11: note: previous declaration as ‘long long int r’
  438 | long long r;
      |           ^
main.cpp: In function ‘int main()’:
main.cpp:478:8: error: ambiguous overload for ‘operator+=’ (operand types are ‘long long int’ and ‘mint’)
  478 |       r+=w[u[i]];
      |       ~^~~~~~~~~
main.cpp:478:8: note: candidate: ‘operator+=(long long int&, long long int)’ (built-in)
main.cpp:478:8: note: candidate: ‘operator+=(long long int&, int)’ (built-in)
main.cpp:481:8: error: ambiguous overload for ‘operator+=’ (operand types are ‘long long int’ and ‘mint’)
  481 |       r+=w[v[i]];
      |       ~^~~~~~~~~
main.cpp:481:8: note: candidate: ‘operator+=(long long int&, long long int)’ (built-in)
main.cpp:481:8: note: candidate: ‘operator+=(long long int&, int)’ (built-in)
main.cpp:484:7: error: call of overloaded ‘wt_L(long long int&)’ is ambiguous
  484 |   wt_L(r);
      |   ~~~~^~~
main.cpp:406:13: note: candidate: ‘void wt_L(char)’
  406 | inline void wt_L(const char a){
      |             ^~~~
main.cpp:409:13: note: candidate: ‘void wt_L(int)’
  409 | inline void wt_L(int x){
      |             ^~~~
main.cpp:431:13: note: candidate: ‘void wt_L(mint)’
  431 | inline void wt_L(mint x){
      |             ^~~~

ソースコード

diff #

ll n,m,r,u[2d5],v[2d5];char s[2d5];
mint w[2d5],r;
{
	rd(n,m,(s+1),(u,v)(m));
	rep(i,m){
		if(s[u[i]]=='P'&&s[v[i]]=='D')w[v[i]]+=1;
		if(s[v[i]]=='P'&&s[u[i]]=='D')w[u[i]]+=1;
	}
	rep(i,m){
		if(s[u[i]]=='D'&&s[v[i]]=='C')w[v[i]]+=w[u[i]];
		if(s[v[i]]=='D'&&s[u[i]]=='C')w[u[i]]+=w[v[i]];
	}
	rep(i,m){
		if(s[u[i]]=='C'&&s[v[i]]=='A')r+=w[u[i]];
		if(s[v[i]]=='C'&&s[u[i]]=='A')r+=w[v[i]];
	}
	wt(r);
}
0